tools/python/pkglint/userland.py
changeset 7957 39baccd8f6e8
parent 6859 569bef81e3c4
equal deleted inserted replaced
7956:4f61047bec23 7957:39baccd8f6e8
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 
    22 
    23 #
    23 #
    24 # Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
    24 # Copyright (c) 2010, 2017, 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
   456 						msgid="%s%s.3" % (self.name, pkglint_id))
   456 						msgid="%s%s.3" % (self.name, pkglint_id))
   457 				result = self.__elf_aslr_check(fullpath, engine)
   457 				result = self.__elf_aslr_check(fullpath, engine)
   458 
   458 
   459 	file_action.pkglint_desc = _("Paths should exist in the proto area.")
   459 	file_action.pkglint_desc = _("Paths should exist in the proto area.")
   460 
   460 
       
   461 	def legacy_action(self, action, manifest, engine, pkglint_id="005"):
       
   462 		"""Checks for deprecated legacy actions."""
       
   463 
       
   464 		if action.name not in ["legacy"]:
       
   465 			return
       
   466 
       
   467 		engine.error(_("legacy actions are deprecated"),
       
   468 			msgid="%s%s.0" % (self.name, pkglint_id))
       
   469 
       
   470 	legacy_action.pkglint_desc = _("legacy actions are deprecated.")
       
   471 
   461 	def link_resolves(self, action, manifest, engine, pkglint_id="002"):
   472 	def link_resolves(self, action, manifest, engine, pkglint_id="002"):
   462 		"""Checks for link resolution."""
   473 		"""Checks for link resolution."""
   463 
   474 
   464 		if action.name not in ["link", "hardlink"]:
   475 		if action.name not in ["link", "hardlink"]:
   465 			return
   476 			return