73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# Permission is hereby granted, free of charge, to any person obtaining a
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# copy of this software and associated documentation files (the "Software"),
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# to deal in the Software without restriction, including without limitation
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# the rights to use, copy, modify, merge, publish, distribute, sublicense,
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# and/or sell copies of the Software, and to permit persons to whom the
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# Software is furnished to do so, subject to the following conditions:
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# The above copyright notice and this permission notice (including the next
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# paragraph) shall be included in all copies or substantial portions of the
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# DEALINGS IN THE SOFTWARE.
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg -> default pkg.obsolete false>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg -> default pkg.renamed false>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# Generate a short package name for use in facet.version-lock
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg pkg.fmri=(pkg:/)?([^@]*) -> default pkg.name %<2>>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# All packages should be included in the consolidation
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# incorporation, unless marked otherwise
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg -> default org.opensolaris.noincorp false>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg -> default org.opensolaris.incorporation \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# Most packages should have a version-lock facet named after the package
eb11fe3584b7b243fb0641da4ab2e157610bb767Lubos Kosco# in order to allow an escape hatch for systems which need a different
eb11fe3584b7b243fb0641da4ab2e157610bb767Lubos Kosco# version of the package and are willing to accept the risk of using an
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# untested combination. Renamed packages do not need this facet.
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg pkg.renamed=true -> \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg -> \
eb11fe3584b7b243fb0641da4ab2e157610bb767Lubos Kosco default org.opensolaris.version-lock-facet true>
eb11fe3584b7b243fb0641da4ab2e157610bb767Lubos Kosco<transform pkg org.opensolaris.noincorp=false \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan org.opensolaris.version-lock-facet=true -> print \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan %(org.opensolaris.incorporation): depend type=incorporate fmri=%(pkg.fmri) \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan facet.version-lock.%(pkg.name)=%(org.opensolaris.version-lock-facet)>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg org.opensolaris.noincorp=false \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan org.opensolaris.version-lock-facet=false -> print \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan %(org.opensolaris.incorporation): depend type=incorporate fmri=%(pkg.fmri)>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan# Add dependency on the incorporation to each non-obsolete package in it
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform pkg pkg.obsolete=false org.opensolaris.noincorp=false -> emit \
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan depend type=require fmri=%(org.opensolaris.incorporation)>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform set name=org.opensolaris.noincorp -> drop>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan<transform set name=org.opensolaris.incorporation -> drop>
<transform set name=org.opensolaris.version-lock-facet -> drop>