tools/userland-mangler
changeset 4973 be26c0c14fa7
parent 2171 b7344f27cbbc
child 5175 c63cda9960d4
--- a/tools/userland-mangler	Fri Oct 02 10:36:56 2015 -0700
+++ b/tools/userland-mangler	Tue Oct 06 07:41:40 2015 -0700
@@ -290,6 +290,18 @@
 		for action in manifest.gen_actions_by_type("license"):
 			manifest.actions.remove(action)
 
+	# Check for pkg.obsolete and if found, remove any depend actions.
+	manifest_is_obsolete = False
+
+	for action in manifest.gen_actions_by_type("set"):
+		if (action.attrs["name"] == "pkg.obsolete" and
+		    action.attrs["value"] == "true"):
+			manifest_is_obsolete = True
+
+	if manifest_is_obsolete:
+		for action in manifest.gen_actions_by_type("depend"):
+			manifest.actions.remove(action)
+
 def load_manifest(manifest_file):
 	manifest = pkg.manifest.Manifest()
 	manifest.set_content(pathname=manifest_file)