transforms/incorporate
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Fri, 10 Oct 2014 10:07:08 -0700
branchs11-update
changeset 3476 c35c8f1a6df1
permissions -rw-r--r--
18139749 userland-incorporator should allow generation of multiple incorporations
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3476
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
# We are overloading the org.opensolaris.consolidation package attribute to 
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
# maintain information about which incorporations a package should belong to.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
# This is done by including 'incorporation' decorations in the attribute.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
# Ex:
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
#    set name=org.opensolaris.consolidation value=userland \
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
#        incorporate=consolidation/userland/userland-incorporation
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
# In the process of package generation, we convert those decorations to
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
# a separate package attribute (pkg.tmp.incorporate) and drop them from
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
# the consolidation attribute. A special value of 'none' will cause the
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
# package to be unincorporated and float freely from the rest of the
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
# packages.  Note that unincorporated packages don't automatically get
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    39
# updated with the rest of the system when 'pkg update' is run unless the
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
# unincorporated package(s) are specified on the command line.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    44
# Add a default incorporate decoration if none exists.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    45
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    46
<transform set name=org.opensolaris.consolidation -> \
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
    default incorporate consolidation/userland/userland-incorporation>
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
# convert the org.opensolaris.consolidation 'incorporate' attribute
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
# to a package attribute containing the incorporations that should
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
# be used in incorporating this package.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
<transform set name=org.opensolaris.consolidation -> emit \
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
    set name=pkg.tmp.incorporate \
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
        value=%(incorporate;sep=' value=')> 
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    58
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    59
# don't incorporate a package that is tagged for unincorporation.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    60
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    61
<transform set name=pkg.tmp.incorporate value=none -> drop>
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    62
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    63
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    64
# Remove any incorporate decoration from the org.opensolaris.consolidation 
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    65
# package attribute.
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    66
#
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
<transform set name=org.opensolaris.consolidation -> \
c35c8f1a6df1 18139749 userland-incorporator should allow generation of multiple incorporations
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
    delete incorporate .*>