transforms/mkgeneric
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 30 Sep 2013 16:13:20 -0700
changeset 1491 e753de6f1440
parent 1056 b2ec61db2a04
child 1907 446472de62e9
permissions -rw-r--r--
Close of build 32.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1056
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     1
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     3
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     7
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    12
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    18
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    20
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    21
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    22
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    23
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    24
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    25
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    26
# This set of transforms helps us take a package that's parameterized on a
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    27
# platform's versions and emit a package that conditionally depends on those
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    28
# versioned packages, predicated on the platform version packages being
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    29
# present.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    30
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    31
# For instance, for a package "mako-generic", we want to create a package
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    32
# "mako", which brings in "mako-26" if "python-26" is present, and "mako-27" if
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    33
# "python-27" is present.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    34
#
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    35
# We do this by grabbing just the set actions from "mako-generic", and emitting
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    36
# those conditional depend actions.  We require that the parameterized package
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    37
# name end in "-###" (typically by setting a pkgmogrify variable to "###"),
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    38
# which we also remove here.  This works in conjunction with a set of rules in
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    39
# make-rules/ips.mk which create and use another transform file that actually
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    40
# emit the conditional dependencies.
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    41
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    42
<transform file dir link hardlink license user group driver legacy signature -> drop>
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    43
<transform depend -> default nodrop false>
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    44
<transform depend nodrop=false -> drop>
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    45
<transform set name=pkg.fmri value=(?:pkg:/)?(.+)-###@(.*) -> \
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    46
	edit value -### "">
b2ec61db2a04 15845939 versionless python manifests
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    47
<transform depend nodrop=true -> delete nodrop true>