19799164 content free packages shouldn't have a TPNO. s11u2-sru
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Sat, 13 Dec 2014 07:22:52 -0800
branchs11u2-sru
changeset 3545 bcd36758306e
parent 3544 bcc54fcde38a
child 3546 53d07f5ab941
19799164 content free packages shouldn't have a TPNO.
components/apache2-modules/mod_wsgi/mod_wsgi.p5m
components/gcc47/developer-gcc-47.p5m
components/gcc47/system-library-gcc-gcc-runtime-47.p5m
components/gcc48/developer-gcc-48.p5m
components/gcc48/developer-gcc-c++.p5m
components/gcc48/developer-gcc-c.p5m
components/gcc48/developer-gcc-gfortran.p5m
components/gcc48/developer-gcc-gobjc.p5m
components/gcc48/developer-gcc.p5m
components/gcc48/system-library-gcc-gcc-runtime-48.p5m
components/gcc48/system-library-gcc-gcc-runtime.p5m
components/python/importlib/importlib.p5m
components/python/jsonrpclib/jsonrpclib.p5m
components/python/ordereddict/ordereddict.p5m
components/python/pycups/pycups.p5m
components/python/unittest2/unittest2.p5m
tools/userland-mangler
--- a/components/apache2-modules/mod_wsgi/mod_wsgi.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/apache2-modules/mod_wsgi/mod_wsgi.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -20,14 +20,13 @@
 #
 
 #
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
     value=pkg:/web/server/apache-22/module/apache-wsgi@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="mod_wsgi plugin for Apache Web Server v2.2"
 set name=com.oracle.info.description value="the mod_wsgi plugin for Apache Web Server v2.2"
-set name=com.oracle.info.tpno value=7687
 set name=info.classification \
     value="org.opensolaris.category.2008:Web Services/Application and Web Servers"
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
--- a/components/gcc47/developer-gcc-47.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc47/developer-gcc-47.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC $(GCC_VERSION)"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - GCC $(GCC_VERSION)"
-set name=com.oracle.info.tpno value=14467
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/Fortran \
--- a/components/gcc47/system-library-gcc-gcc-runtime-47.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc47/system-library-gcc-gcc-runtime-47.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC $(GCC_VERSION) - GCC Runtime"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - Compiler Runtime Libraries"
-set name=com.oracle.info.tpno value=14467
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/Fortran \
--- a/components/gcc48/developer-gcc-48.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/developer-gcc-48.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC $(GCC_VERSION)"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - GCC $(GCC_VERSION)"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/Fortran \
--- a/components/gcc48/developer-gcc-c++.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/developer-gcc-c++.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC - C++ Compiler"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - C++ Compiler"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/GNU
--- a/components/gcc48/developer-gcc-c.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/developer-gcc-c.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC - C Compiler"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - C Compiler"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/GNU
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
--- a/components/gcc48/developer-gcc-gfortran.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/developer-gcc-gfortran.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC - GNU Fortran Compiler"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - Fortran Compiler"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification \
     value=org.opensolaris.category.2008:Development/Fortran \
     value=org.opensolaris.category.2008:Development/GNU
--- a/components/gcc48/developer-gcc-gobjc.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/developer-gcc-gobjc.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC - Objective-C Compiler"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - Objective-C Compiler"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/GNU \
     value="org.opensolaris.category.2008:Development/Objective C"
--- a/components/gcc48/developer-gcc.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/developer-gcc.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -25,7 +25,6 @@
     value=pkg:/developer/gcc@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value=GCC
 set name=com.oracle.info.description value="the GNU Compiler Collection"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/Fortran \
--- a/components/gcc48/system-library-gcc-gcc-runtime-48.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/system-library-gcc-gcc-runtime-48.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC $(GCC_VERSION) - GCC Runtime"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - Compiler Runtime Libraries"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/Fortran \
--- a/components/gcc48/system-library-gcc-gcc-runtime.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/gcc48/system-library-gcc-gcc-runtime.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -26,7 +26,6 @@
 set name=pkg.summary value="GCC - GCC Runtime"
 set name=com.oracle.info.description \
     value="the GNU Compiler Collection - Compiler Runtime Libraries"
-set name=com.oracle.info.tpno value=15448
 set name=info.classification value=org.opensolaris.category.2008:Development/C \
     value=org.opensolaris.category.2008:Development/C++ \
     value=org.opensolaris.category.2008:Development/Fortran \
--- a/components/python/importlib/importlib.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/python/importlib/importlib.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -27,7 +27,6 @@
 set name=pkg.description \
     value="The importlib module contains the code from importlib as found in Python 2.7. It is provided so that people who wish to use importlib.import_module() with a version of Python prior to 2.7 or in 3.0 have the function readily available."
 set name=com.oracle.info.description value="the Python importlib module"
-set name=com.oracle.info.tpno value=14503
 set name=info.classification \
     value=org.opensolaris.category.2008:Development/Python
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
--- a/components/python/jsonrpclib/jsonrpclib.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/python/jsonrpclib/jsonrpclib.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -18,13 +18,12 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/library/python-2/jsonrpclib@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Python implementation of JSON-RPC v2.0"
 set name=com.oracle.info.description value="the Python implementation of JSON-RPC v2.0"
-set name=com.oracle.info.tpno value=8061
 set name=info.classification value="org.opensolaris.category.2008:Development/Python"
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=info.upstream value="Josh Marshall <[email protected]>"
--- a/components/python/ordereddict/ordereddict.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/python/ordereddict/ordereddict.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -26,7 +26,6 @@
 set name=pkg.summary value="Python ordereddict library"
 set name=com.oracle.info.description \
     value="Drop-in substitute for Py2.7's new collections.OrderedDict. The recipe has big-oh performance that matches regular dictionaries (amortized O(1) insertion/deletion/lookup and O(n) iteration/repr/copy/equality_testing)."
-set name=com.oracle.info.tpno value=14503
 set name=info.classification \
     value=org.opensolaris.category.2008:Development/Python
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
--- a/components/python/pycups/pycups.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/python/pycups/pycups.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -18,13 +18,12 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/library/python-2/pycups@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Python bindings for CUPS"
 set name=com.oracle.info.description value="the Python language bindings for CUPS"
-set name=com.oracle.info.tpno value=9025
 set name=info.classification value=org.opensolaris.category.2008:System/Printing
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
--- a/components/python/unittest2/unittest2.p5m	Fri Dec 12 13:24:29 2014 -0800
+++ b/components/python/unittest2/unittest2.p5m	Sat Dec 13 07:22:52 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -28,7 +28,6 @@
     value="Many new features were added to unittest in Python 2.7, including test discovery. unittest2 allows you to use these features with earlier versions of Python."
 set name=com.oracle.info.description \
     value="the unittest2 Python unit testing framework"
-set name=com.oracle.info.tpno value=14503
 set name=info.classification \
     value=org.opensolaris.category.2008:Development/Python
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
--- a/tools/userland-mangler	Fri Dec 12 13:24:29 2014 -0800
+++ b/tools/userland-mangler	Sat Dec 13 07:22:52 2014 -0800
@@ -19,7 +19,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 #
 # userland-mangler - a file mangling utility
@@ -257,6 +257,23 @@
 					mangle_path(manifest, action, src, dest)
 					break
 
+def mangle_manifest(manifest):
+	# Check for file content and remove tpno data and license actions if
+	# there is no content in the package that can be licensed.
+	manifest_has_file_content = False
+
+	for action in manifest.gen_actions_by_type("file"):
+		manifest_has_file_content = True
+		break
+
+	if not manifest_has_file_content:
+		# search for and remove 'set name=com.oracle.info.tpno ...'
+		for action in manifest.gen_actions_by_type("set"):
+			if (action.attrs["name"] == "com.oracle.info.tpno"):
+				manifest.actions.remove(action)
+		for action in manifest.gen_actions_by_type("license"):
+			manifest.actions.remove(action)
+
 def load_manifest(manifest_file):
 	manifest = pkg.manifest.Manifest()
 	manifest.set_content(pathname=manifest_file)
@@ -305,6 +322,7 @@
 
 	for manifest in manifests:
 		mangle_paths(manifest, search_paths, destination)
+		mangle_manifest(manifest)
 		print manifest
 
 	sys.exit(0)