xref: /titanic_41/usr/src/pkg/transforms/publish (revision 77c29b8ee88bf82021ff549b17b44e17f2ef7d7b)
1*ead1f93eSLiane Praza#
2*ead1f93eSLiane Praza# CDDL HEADER START
3*ead1f93eSLiane Praza#
4*ead1f93eSLiane Praza# The contents of this file are subject to the terms of the
5*ead1f93eSLiane Praza# Common Development and Distribution License (the "License").
6*ead1f93eSLiane Praza# You may not use this file except in compliance with the License.
7*ead1f93eSLiane Praza#
8*ead1f93eSLiane Praza# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*ead1f93eSLiane Praza# or http://www.opensolaris.org/os/licensing.
10*ead1f93eSLiane Praza# See the License for the specific language governing permissions
11*ead1f93eSLiane Praza# and limitations under the License.
12*ead1f93eSLiane Praza#
13*ead1f93eSLiane Praza# When distributing Covered Code, include this CDDL HEADER in each
14*ead1f93eSLiane Praza# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*ead1f93eSLiane Praza# If applicable, add the following below this CDDL HEADER, with the
16*ead1f93eSLiane Praza# fields enclosed by brackets "[]" replaced with your own identifying
17*ead1f93eSLiane Praza# information: Portions Copyright [yyyy] [name of copyright owner]
18*ead1f93eSLiane Praza#
19*ead1f93eSLiane Praza# CDDL HEADER END
20*ead1f93eSLiane Praza#
21*ead1f93eSLiane Praza
22*ead1f93eSLiane Praza#
23*ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24*ead1f93eSLiane Praza# Use is subject to license terms.
25*ead1f93eSLiane Praza#
26*ead1f93eSLiane Praza
27*ead1f93eSLiane Praza#
28*ead1f93eSLiane Praza# Only publish packages for the currently specified architecture
29*ead1f93eSLiane Praza#
30*ead1f93eSLiane Praza# This is somewhat nonintuitive.  In English:
31*ead1f93eSLiane Praza#
32*ead1f93eSLiane Praza#	For any action of type "set",
33*ead1f93eSLiane Praza#	if the "name" property matches the regex "variant.arch",
34*ead1f93eSLiane Praza#	and *every* occurrence of the "value" property does not match
35*ead1f93eSLiane Praza#		$ARCH, then don't publish it.
36*ead1f93eSLiane Praza#
37*ead1f93eSLiane Praza# ...in other words, if *any* occurrence of "value" matches $(ARCH),
38*ead1f93eSLiane Praza# then the negative lookahead assertion in the regex will fail, and we
39*ead1f93eSLiane Praza# won't abort based on the action.
40*ead1f93eSLiane Praza#
41*ead1f93eSLiane Praza<transform set name=variant.arch value=^(?!$(ARCH)).+$ -> abort>
42*ead1f93eSLiane Praza
43*ead1f93eSLiane Praza#
44*ead1f93eSLiane Praza# Catch don't-publish settings from manifest-embedded transforms
45*ead1f93eSLiane Praza#
46*ead1f93eSLiane Praza<transform set name=osnet.publish value=false -> abort>
47*ead1f93eSLiane Praza<transform set name=osnet.publish -> drop>
48