7186815 ncftp needs TPNO and license file modifications
authorMike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 24 Sep 2012 10:58:59 -0700
changeset 988 6c55a0653898
parent 987 810b92005f34
child 989 e18b35b042df
7186815 ncftp needs TPNO and license file modifications 7198032 mangler should note it modified man pages and possibly when
components/ncftp/ncftp.license
components/ncftp/ncftp.p5m
tools/userland-mangler
--- a/components/ncftp/ncftp.license	Fri Sep 21 11:29:34 2012 -0700
+++ b/components/ncftp/ncftp.license	Mon Sep 24 10:58:59 2012 -0700
@@ -1,3 +1,10 @@
+----------------
+- ncftp 3.2.3  -
+----------------
+
+Oracle Internal Tracking Number 9255
+
+
 		     The Clarified Artistic License
 
 				Preamble
--- a/components/ncftp/ncftp.p5m	Fri Sep 21 11:29:34 2012 -0700
+++ b/components/ncftp/ncftp.p5m	Mon Sep 24 10:58:59 2012 -0700
@@ -18,10 +18,11 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
+<transform file path=usr.*/man/.+ -> default mangler.man.modified-date "April 20, 2011">
 set name=pkg.fmri value=pkg:/network/ftp/ncftp@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="NcFTP - client application implementing FTP"
 set name=info.classification value="org.opensolaris.category.2008:Applications/Internet"
--- a/tools/userland-mangler	Fri Sep 21 11:29:34 2012 -0700
+++ b/tools/userland-mangler	Mon Sep 24 10:58:59 2012 -0700
@@ -19,7 +19,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 #
 # userland-mangler - a file mangling utility
@@ -37,6 +37,9 @@
 import pkg.actions
 import pkg.elf as elf
 
+attribute_oracle_table_header = """
+.\\\" Oracle has added the ARC stability level to this manual page"""
+
 attribute_table_header = """
 .SH ATTRIBUTES
 See
@@ -61,12 +64,15 @@
 .TE 
 .PP
 """
-def attributes_section_text(availability, stability):
+def attributes_section_text(availability, stability, modified_date):
 	result = ''
 
 	# is there anything to do?
 	if availability is not None or stability is not None:
-		result = attribute_table_header
+		result = attribute_oracle_table_header
+		if modified_date is not None:
+			result += ("\n.\\\" on %s" % modified_date)
+		result += attribute_table_header
 
 		if availability is not None:
 			result += (attribute_table_availability % availability)
@@ -76,6 +82,9 @@
 
 	return result
 
+notes_oracle_comment = """
+.\\\" Oracle has added source availability information to this manual page"""
+
 notes_header = """
 .SH NOTES
 """
@@ -87,13 +96,16 @@
 This software was built from source available at http://opensolaris.org/.  The original community source was downloaded from  %s
 """
 
-def notes_section_text(header_seen, community, source):
+def notes_section_text(header_seen, community, source, modified_date):
 	result = ''
 
 	# is there anything to do?
 	if community is not None or source is not None:
 		if header_seen == False:
 			result += notes_header
+		result += notes_oracle_comment
+		if modified_date is not None:
+			result += ("\n.\\\" on %s" % modified_date)
 		if source is not None:
 			result += (notes_source % source)
 		if community is not None:
@@ -105,6 +117,7 @@
 section_re = re.compile('\.SH "?([^"]+).*$', re.IGNORECASE)
 #
 # mangler.man.stability = (mangler.man.stability)
+# mangler.man.modified_date = (mangler.man.modified-date)
 # mangler.man.availability = (pkg.fmri)
 # mangler.man.source-url = (pkg.source-url)
 # mangler.man.upstream-url = (pkg.upstream-url)
@@ -116,6 +129,9 @@
 		sys.stderr.write("ERROR: manpage action missing mangler.man.stability: %s" % action)
 		sys.exit(1)
 
+	# manpages may have a 'modified date'
+	modified_date = action.attrs.pop('mangler.man.modified-date', None)
+
 	attributes_written = False
 	notes_seen = False
 
@@ -149,16 +165,19 @@
 				if attributes_written == False:
 					result += attributes_section_text(
 								 availability,
-								 stability)
+								 stability,
+								 modified_date)
 					attributes_written = True
 				if section == 'NOTES':
 					notes_seen = True
 		result += ("%s\n" % line)
 
 	if attributes_written == False:
-		result += attributes_section_text(availability, stability)
+		result += attributes_section_text(availability, stability,
+		    modified_date)
 
-	result += notes_section_text(notes_seen, community, source)
+	result += notes_section_text(notes_seen, community, source,
+	    modified_date)
 
 	return result