tools/python/pkglint/userland.py
changeset 4144 d46329d3d81e
parent 4069 0dd96f5ba7da
child 4193 cdabb94af4f2
equal deleted inserted replaced
4143:bba1a37c4d02 4144:d46329d3d81e
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 
    22 
    23 #
    23 #
    24 # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
    24 # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
    25 #
    25 #
    26 
    26 
    27 # Some userland consolidation specific lint checks
    27 # Some userland consolidation specific lint checks
    28 
    28 
    29 import pkg.lint.base as base
    29 import pkg.lint.base as base
   122                                 if attr not in action.attrs:
   122                                 if attr not in action.attrs:
   123                                         continue
   123                                         continue
   124 
   124 
   125                                 variants = action.get_variant_template()
   125                                 variants = action.get_variant_template()
   126                                 variants.merge_unknown(pkg_vars)
   126                                 variants.merge_unknown(pkg_vars)
   127                                 action.attrs.update(variants)
   127                                 # Action attributes must be lists or strings.
       
   128                                 for k, v in variants.iteritems():
       
   129                                         if isinstance(v, set):
       
   130                                                 action.attrs[k] = list(v)
       
   131                                         else:
       
   132                                                 action.attrs[k] = v
   128 
   133 
   129                                 p = action.attrs[attr]
   134                                 p = action.attrs[attr]
   130                                 dic.setdefault(p, []).append((mf.fmri, action))
   135                                 dic.setdefault(p, []).append((mf.fmri, action))
   131 
   136 
   132                 # construct a set of FMRIs being presented for linting, and
   137                 # construct a set of FMRIs being presented for linting, and