userland-incorporator revision 5680
#
# 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
# 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
#
#
#
#
# incorporator - an utility to incorporate packages in a repo
#
sys.exit(1)
else:
version = '5.12'
packages = {}
self.packages = {}
# strip the :timestamp from the version string
# strip the ,{build-release} from the version string
return "depend fmri=%s@%s facet.version-lock.%s=true type=incorporate" % (name, version, name)
result = """
set name=pkg.fmri value=pkg:/%s@%s
set name=org.opensolaris.consolidation value=userland
set name=pkg.depend.install-hold value=core-os.userland
set name=pkg.description value="This incorporation constrains packages from the userland consolidation"
""" % (self.name, self.version, self.name)
return result
#
# This should probably use the pkg APIs at some point, but this appears to be
# a stable and less complicated interface to gathering information from the
# manifests in the package repo.
#
packages = {}
incorporations = {}
versions = {}
#
# if a static file was provided, prime the cache with the contents of
# that file.
#
if static_file:
try:
else:
# find the incorporation and add the package
#
# Load the repository for packages to incorporate.
#
if repository:
#
# Check for multiple versions of packages in the repo, but keep track of
# the latest one.
#
warning("%s is in the repo at multiple versions (%s, %s)" % (pkg_name, pkg_version, versions[pkg_name]))
#
# Add published packages to the incorporation lists
#
# skip older packages and those that don't want to be incorporated
continue
# a dict inside a list inside a dict
# if we haven't started to build this incorporation, create one.
# find the incorporation and add the package
return incorporations
try:
["repository=", "publisher=", "version=",
"consolidation=", "destdir=", "Werror",
"static-content-file="])
filename = ''
fd.close()
if __name__ == "__main__":