tools/python/pkglint/userland.py
changeset 7957 39baccd8f6e8
parent 6859 569bef81e3c4
--- a/tools/python/pkglint/userland.py	Wed Apr 19 21:56:10 2017 +0000
+++ b/tools/python/pkglint/userland.py	Mon May 01 08:43:32 2017 -0700
@@ -21,7 +21,7 @@
 #
 
 #
-# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 # Some userland consolidation specific lint checks
@@ -458,6 +458,17 @@
 
 	file_action.pkglint_desc = _("Paths should exist in the proto area.")
 
+	def legacy_action(self, action, manifest, engine, pkglint_id="005"):
+		"""Checks for deprecated legacy actions."""
+
+		if action.name not in ["legacy"]:
+			return
+
+		engine.error(_("legacy actions are deprecated"),
+			msgid="%s%s.0" % (self.name, pkglint_id))
+
+	legacy_action.pkglint_desc = _("legacy actions are deprecated.")
+
 	def link_resolves(self, action, manifest, engine, pkglint_id="002"):
 		"""Checks for link resolution."""