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