Danek Duvall wrote:
Rich Burridge wrote:

 http://defect.opensolaris.org/bz/show_bug.cgi?id=12972
 The various clusters listed in redist_cluster need to have consolidation lines

Perhaps I missed it in all the email, but I don't understand the rationale
behind this.  The bug neither explains it, nor references another bug which
does.  And it seems very sketchy to me to shove "consolidation" tags into
packages which aren't part of any particular consolidation (but are all
defined in the "ips" consolidation).

The intent is to adjust the build_entire_incorporation script to
just work off the various consolidations (see attached script)
rather than munge on the contents of the "redistributable" package.

For this to generate a "complete" entire, then the various
clusters that are currently part of redist_cluster need to be in
one consolidation or another.

#!/bin/ksh93
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
export PATH=../../../proto/root_$(uname -p)/usr/bin:$PATH
export PYTHONPATH=../../../proto/root_$(uname 
-p)/usr/lib/python2.6/vendor-packages
export PACKAGEPATH=../../../packages/i386

TMPFILE=$(mktemp ./temp_redistXXXXXX)
#
# This needs to be kept in sync with the redistributable version number.
#
REDIST_CLUSTER_VERSION=0.1

# Ensure that we catch any pipeline failures.
set -o pipefail
trap 'rm -fr $TMPFILE ./temp_image; print -u2 "$0: fatal error"; exit 1' ERR 
EXIT

if [[ -z $1 ]]; then
        print -u2 "usage: $0 <buildid>"
        exit 1
fi
if [[ -z $REPO ]]; then
        print -u2 "\$REPO must be set to a repository URL"
        exit 1
fi

buildid=$(echo $1 | tr -d '[a-z]')

# These are both hacky, horrible ways to get this information, but until there
# is a client API in place that can handle all repository types, it's necessary.
if [[ "$REPO" == http* ]]; then
        # create a temp image so we can get things from the repo
        pkg image-create -a opensolaris.org=$REPO ./temp_image > /dev/null || \
            exit 1
        pkg -R ./temp_image list -aH "consolidation/*/*-incorporation" | \
            nawk '{print "depend fmri=" $1 "@" $2 " type=incorporate"}' > 
$TMPFILE || \
            exit 1
        rm -r ./temp_image
elif [[ "$REPO" == file* ]]; then
        REPO_PATH=$(echo $REPO | sed 's...@file://@@' || exit 1)
        ls 
$REPO_PATH/pkg/consolidation%2F*%2F*-incorporation/*%2C*-0.${buildid}* | \
            sed 's/^/depend fmri=/;s/$/ type=incorporate/' | \
            sed 's?%2F?/?g;s/%2C/-/g;s/%3A/:/g' > $TMPFILE || exit 1
else
        exit 1
fi

if [[ ! -s $TMPFILE ]]; then
        print -u2 "zero length redistributable incorporation!"
        exit 1
fi

#
# We use the unstripped build id here.
#
# Note also that we don't add a classification, as this package is an
# implementation artifact.
#
echo "set name=pkg.summary value=\"Build $1 entire incorporation\""
echo "set name=description value=\"Build $1 entire incorporation\""
echo "set name=pkg.description value=\"This package constrains" \
    "package versions to those for build $1.  WARNING: Proper" \
    "system update and correct package selection depend on the" \
    "presence of this incorporation.  Removing this package will" \
    "result in an unsupported system.\""
cat $TMPFILE
rm -f $TMPFILE
trap '' ERR EXIT
exit 0
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to