tools/python/pkglint/userland.py
changeset 181 87e11e685b1f
parent 168 5884bc1edfdf
child 186 3adedf0f9f4d
equal deleted inserted replaced
180:4de0581be621 181:87e11e685b1f
   221         name = "userland.manifest"
   221         name = "userland.manifest"
   222 
   222 
   223 	def __init__(self, config):
   223 	def __init__(self, config):
   224 		super(UserlandManifestChecker, self).__init__(config)
   224 		super(UserlandManifestChecker, self).__init__(config)
   225 
   225 
   226 	def license_check(self, manifest, engine, pkglint_id="001"):
   226 	def component_check(self, manifest, engine, pkglint_id="001"):
   227 		manifest_paths = []
   227 		manifest_paths = []
   228 		files = False
   228 		files = False
   229 		license = False
   229 		license = False
   230 
   230 
   231 		for action in manifest.gen_actions_by_type("file"):
   231 		for action in manifest.gen_actions_by_type("file"):
   234 
   234 
   235 		if files == False:
   235 		if files == False:
   236 			return
   236 			return
   237 
   237 
   238 		for action in manifest.gen_actions_by_type("license"):
   238 		for action in manifest.gen_actions_by_type("license"):
   239 			return
   239 			license = True
   240 
   240 			break
   241 		engine.error( _("missing license action"),
   241 
   242 			msgid="%s%s.0" % (self.name, pkglint_id))
   242 		if license == False:
   243 
   243 			engine.error( _("missing license action"),
   244 	license_check.pkglint_dest = _(
   244 				msgid="%s%s.0" % (self.name, pkglint_id))
   245 		"license actions are required if you deliver files.")
   245 
       
   246 		if 'opensolaris.arc_url' not in manifest:
       
   247 			engine.error( _("missing ARC data (opensolaris.arc_url)"),
       
   248 				msgid="%s%s.0" % (self.name, pkglint_id))
       
   249 
       
   250 	component_check.pkglint_dest = _(
       
   251 		"license actions and iARC information are required if you deliver files.")