tools/python/pkglint/userland.py
changeset 1020 4740049105f5
parent 623 15f87c23a86e
child 1138 6e1f85fa0151
equal deleted inserted replaced
1019:9d261d526266 1020:4740049105f5
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 
    22 
    23 #
    23 #
    24 # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    24 # Copyright (c) 2010, 2012, 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
   397 			engine.error( _("missing ARC data (org.opensolaris.arc-caseid)"),
   397 			engine.error( _("missing ARC data (org.opensolaris.arc-caseid)"),
   398 				msgid="%s%s.0" % (self.name, pkglint_id))
   398 				msgid="%s%s.0" % (self.name, pkglint_id))
   399 
   399 
   400 	component_check.pkglint_dest = _(
   400 	component_check.pkglint_dest = _(
   401 		"license actions and ARC information are required if you deliver files.")
   401 		"license actions and ARC information are required if you deliver files.")
       
   402 
       
   403         def publisher_in_fmri(self, manifest, engine, pkglint_id="002"):
       
   404                 lint_id = "%s%s" % (self.name, pkglint_id)
       
   405                 allowed_pubs = engine.get_param(
       
   406                     "%s.allowed_pubs" % lint_id).split(" ") 
       
   407 
       
   408                 fmri = manifest.fmri
       
   409                 if fmri.publisher and fmri.publisher not in allowed_pubs:
       
   410                         engine.error(_("package %s has a publisher set!") %
       
   411                             manifest.fmri,
       
   412                             msgid="%s%s.2" % (self.name, pkglint_id))