Mike Sullivan
2012-09-24 90e68e8c59fb3f2358058f9516c5af8e493a1b3a
7186815 ncftp needs TPNO and license file modifications
7198032 mangler should note it modified man pages and possibly when
3 files modified
43 ■■■■ changed files
components/ncftp/ncftp.license 7 ●●●●● patch | view | raw | blame | history
components/ncftp/ncftp.p5m 3 ●●●● patch | view | raw | blame | history
tools/userland-mangler 33 ●●●● patch | view | raw | blame | history
components/ncftp/ncftp.license
@@ -1,3 +1,10 @@
----------------
- ncftp 3.2.3  -
----------------
Oracle Internal Tracking Number 9255
             The Clarified Artistic License
                Preamble
components/ncftp/ncftp.p5m
@@ -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"
tools/userland-mangler
@@ -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
@@ -36,6 +36,9 @@
import pkg.manifest
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
@@ -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)
@@ -75,6 +81,9 @@
        result += attribute_table_footer
    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)
@@ -115,6 +128,9 @@
    if stability is None:
        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