1005 Provide import target for ClusterTools 7.1
authorBart Smaalders <Bart.Smaalders@Sun.COM>
Wed, 16 Apr 2008 14:26:36 -0700
changeset 328 83af2c933642
parent 327 6c6bd07efe8d
child 329 f549eab0d7b7
1005 Provide import target for ClusterTools 7.1 1006 Provide import target for Sun Studio Express 0508 1044 Provide import target for NetBeans IDE 6.0.1 1169 solaris.py should strip (Usr) and (Root) 1264 NONWOS_PKGS needs to be expanded to include arch-neutral pkgs from RE dock. updated incorporation to include latest changes
.hgignore
src/util/distro-import/86/entire.incorporation
src/util/distro-import/Makefile
src/util/distro-import/package_names.py
src/util/distro-import/publish_ips
src/util/distro-import/solaris.py
src/util/distro-import/unbundleds/ClusterTools
src/util/distro-import/unbundleds/NetBeans
src/util/distro-import/unbundleds/Studio
--- a/.hgignore	Tue Apr 15 15:13:20 2008 -0700
+++ b/.hgignore	Wed Apr 16 14:26:36 2008 -0700
@@ -1,11 +1,12 @@
 # Ignore compiled byte code, lint output, object files, shared objects,
-# VIM swap files, and the entire proto area.
+# VIM swap files, emacs backups and the entire proto area.
 \.pyc
 \.ln
 \.o
 \.so
 \.sw.
 \.make\.
+~$
 ^proto
 ^packages
 # Specific build products
--- a/src/util/distro-import/86/entire.incorporation	Tue Apr 15 15:13:20 2008 -0700
+++ b/src/util/distro-import/86/entire.incorporation	Wed Apr 16 14:26:36 2008 -0700
@@ -5,7 +5,6 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -118,7 +117,6 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -257,7 +255,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -302,7 +300,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -358,7 +356,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -444,7 +442,6 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -511,6 +508,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -638,6 +636,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -740,6 +739,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -803,7 +803,6 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -914,7 +913,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -927,7 +926,6 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
@@ -964,7 +962,7 @@
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
-depend fmri=pkg:/[email protected] type=incorporate
+depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
 depend fmri=pkg:/[email protected] type=incorporate
--- a/src/util/distro-import/Makefile	Tue Apr 15 15:13:20 2008 -0700
+++ b/src/util/distro-import/Makefile	Wed Apr 16 14:26:36 2008 -0700
@@ -27,8 +27,11 @@
 # Needs to point to filesystem on Solaris install dvd
 # replace as needed with a local solaris install image
 
+
 WOS_PKGS=/net/netinstall.sfbay/export/nv/x/$(BUILDID)/Solaris_11/Product
-NONWOS_PKGS=/net/paradise.sfbay/export/integrate_dock/nv/nv_indiana1/i386
+NONWOS_PKGS=/net/paradise.sfbay/export/integrate_dock/nv/nv_indiana1/all \
+            /net/paradise.sfbay/export/integrate_dock/nv/nv_indiana1/i386
+
 TEST_PKGS=
 REPO=http://localhost:10000
 JUST_THESE_PKGS=
@@ -38,6 +41,8 @@
 	 $(WOS_PKGS)
 
 TMPPKGS=SUNWfixes
+EXTRA_OPTIONS=
+SOLARIS.PY=./solaris.py $(EXTRA_OPTIONS)
 
 #
 # always remove the following (editable) files from packages we bulk import;
@@ -109,6 +114,16 @@
 
 LINTFLAGS=	-axsm
 
+UNBUNDLED_TARGETS=\
+ClusterTools.import\
+Studio.import\
+NetBeans.import
+
+BUILDS= 75a\
+	79b\
+	86
+
+
 #
 # Starting in build 80, filelist.ramdisk began moving between various
 # packages.
@@ -246,21 +261,21 @@
 
 import:	cluster.import $(TMPPKGS)
 	rm -f all.i386.$(BUILDID); ln -s $(BUILDID)/all.i386.$(BUILDID)
-	./solaris.py -s $(REPO) -w $(WOS_PKGS) $(ELIDED_FILES:%=-D %) all.i386.$(BUILDID)
+	$(SOLARIS.PY) -s $(REPO) -w $(WOS_PKGS) $(ELIDED_FILES:%=-D %) all.i386.$(BUILDID)
 
 %/import:
 	$(MAKE) BUILDID=$(@:%/import=%) import
 
 slim_import:	$(BUILDID)/slim_cluster $(TMPPKGS)
 	rm -f slim_cluster; ln -s $(BUILDID)/slim_cluster slim_cluster
-	./solaris.py -s $(REPO) $(ALL_PKGS:%=-w %) $(ELIDED_FILES:%=-D %) slim_cluster $(JUST_THESE_PKGS)
+	$(SOLARIS.PY) -s $(REPO) $(ALL_PKGS:%=-w %) $(ELIDED_FILES:%=-D %) $(JUST_THESE_PKGS:%=-j %) slim_cluster 
 
 %/slim_import:
 	$(MAKE) BUILDID=$(@:%/slim_import=%) slim_import
 
 redist_import:	$(BUILDID)/redist_cluster $(TMPPKGS)
 	rm -f redist_cluster; ln -s $(BUILDID)/redist_cluster redist_cluster
-	./solaris.py -s $(REPO) $(ALL_PKGS:%=-w %) $(ELIDED_FILES:%=-D %) redist_cluster $(JUST_THESE_PKGS)
+	$(SOLARIS.PY) -s $(REPO) $(ALL_PKGS:%=-w %) $(ELIDED_FILES:%=-D %) $(JUST_THESE_PKGS:%=-j %) redist_cluster 
 
 %/redist_import:
 	$(MAKE) BUILDID=$(@:%/redist_import=%) redist_import
@@ -270,6 +285,21 @@
 
 entire: $(BUILDID)/entire.incorporation
 	PKG_REPO=$(REPO) ./import_manifest_file [email protected],5.11-0.$(BUILDID) $(BUILDID)/entire.incorporation
+
+$(UNBUNDLED_TARGETS:%=$(BUILDS)/%):
+	$(MAKE) BUILDID=$(@D) $(@F)
+
+$(UNBUNDLED_TARGETS): unbundleds/$$(@:%.import=%)
+	rm -f redist_cluster; ln -s $(BUILDID)/redist_cluster redist_cluster
+	$(SOLARIS.PY) -s $(REPO) $(ALL_PKGS:%=-w %) $(ELIDED_FILES:%=-D %) `./package_names.py unbundleds/$(@:%.import=%)`  unbundleds/$(@:%.import=%) redist_cluster
+
+
+%/SUNWipkg:
+	$(MAKE) BUILDID=$(@D) $(@F)
+
+SUNWipkg:
+	PKG_REPO=$(REPO) ./publish_ips pkg:/[email protected],5.11-0.`echo $(BUILDID) | tr '[a-z]' ' '`
+
 clean:
 	rm -f $(OBJS)
 	rm -rf proto
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/util/distro-import/package_names.py	Wed Apr 16 14:26:36 2008 -0700
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+#
+# 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 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+
+#
+# scan argument files for driver actions; then act as filter, 
+# removing lines which contain a driver name in the first
+# column
+#
+
+import sys
+
+def scan_import_file(s):
+        file = open(s)
+
+        for line in file:
+                fields = line.split()
+                if fields and fields[0] == "include":
+                        scan_import_file(fields[1])
+                elif len(fields) == 2 and fields[0] == "package":
+                        package_names[fields[1]] = True
+        file.close()
+
+package_names={}
+
+for arg in sys.argv[1:]:
+        scan_import_file(arg)
+
+for name in package_names:
+        print "-j %s" % name
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/util/distro-import/publish_ips	Wed Apr 16 14:26:36 2008 -0700
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# 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 2008 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.4/vendor-packages
+export PACKAGEPATH=../../../packages/i386
+eval `pkgsend open $1`
+pkgsend import $PACKAGEPATH/SUNWipkg
+pkgsend close
--- a/src/util/distro-import/solaris.py	Tue Apr 15 15:13:20 2008 -0700
+++ b/src/util/distro-import/solaris.py	Wed Apr 16 14:26:36 2008 -0700
@@ -121,8 +121,8 @@
                 if not self.version:
                         self.version = "%s-%s" % (def_vers, def_branch)
                 if not self.desc:
-                        self.desc = p.pkginfo["NAME"]
-
+                        self.desc = zap_strings(p.pkginfo["NAME"], description_detritus)
+			
                 # This is how we'd import dependencies, but we'll use
                 # file-specific dependencies only, since these tend to be
                 # broken.
@@ -744,6 +744,19 @@
 
         return dep_pkgs, undeps
 
+def zap_strings(input, strings):
+	""" takes an input string and a list of strings to be removed, ignoring case"""
+	for s in strings:
+		ls = s.lower()
+		while True:
+			li = input.lower()
+			i = li.find(ls)
+			if i < 0:
+				break
+			input = input[0:i] + input[i + len(ls):]
+	return input
+
+	
 def_vers = "0.5.11"
 def_branch = ""
 def_wos_path = ["/net/netinstall.eng/export/nv/x/latest/Solaris_11/Product"]
@@ -756,9 +769,19 @@
 # note that we ignore these if specifically included.
 #
 elided_files = {}
+#
+# if user uses -j, just_these_pkgs becomes list of pkgs to process
+# allowing other arguments to be read in as files...
+#
+just_these_pkgs = []
+#
+# strings to rip out of descriptions (case insensitve)
+#
+description_detritus = [", (usr)", ", (root)", " (usr)", " (root)",
+" (/usr)", " - / filesystem", ",root(/)"]
 
 try:
-        opts, args = getopt.getopt(sys.argv[1:], "D:b:dns:v:w:")
+        opts, args = getopt.getopt(sys.argv[1:], "D:b:dns:v:w:j:")
 except getopt.GetoptError, e:
         print "unknown option", e.opt
         sys.exit(1)
@@ -778,6 +801,8 @@
                 wos_path.append(arg)
         elif opt == "-D":
                 elided_files[arg] = True
+	elif opt == "-j": # means we're using the new argument form...
+		just_these_pkgs.append(arg)
 
 if not def_branch:
         try:
@@ -806,10 +831,12 @@
 if not wos_path:
         wos_path = def_wos_path
 
-infile = file(args[0])
-lexer = shlex.shlex(infile, args[0], True)
-lexer.whitespace_split = True
-lexer.source = "include"
+if just_these_pkgs:
+	filelist = args
+else:
+	filelist = args[0]
+	just_these_pkgs = args[1:]
+
 
 in_multiline_import = False
 
@@ -855,130 +882,142 @@
 
 print "First pass:", datetime.now()
 
+
 # First pass: don't actually publish anything, because we're not collecting
 # dependencies here.
-while True:
-        token = lexer.get_token()
+
+lexer = None
+
+for mf in filelist:
 
-        if not token:
-                break
+	lexer = shlex.shlex(file(mf), mf, True)
+	lexer.whitespace_split = True		 
+	lexer.source = "include"
 
-        if token == "package":
-                curpkg = start_package(lexer.get_token())
+	print "Processing %s" % lexer.infile
+
+	while True:
+		token = lexer.get_token()
 
-        elif token == "end":
-                endarg = lexer.get_token()
-                if endarg == "package":
-                        try:
-                                end_package(curpkg)
-                        except Exception, e:
-                                print "ERROR(end_pkg):", e
+		if not token:
+			break
+
+		if token == "package":
+			curpkg = start_package(lexer.get_token())
 
-                        curpkg = None
-                if endarg == "import":
-                        in_multiline_import = False
-                        curpkg.imppkg = None
+		elif token == "end":
+			endarg = lexer.get_token()
+			if endarg == "package":
+				try:
+					end_package(curpkg)
+				except Exception, e:
+					print "ERROR(end_pkg):", e
 
-        elif token == "version":
-                curpkg.version = lexer.get_token()
+				curpkg = None
+			if endarg == "import":
+				in_multiline_import = False
+				curpkg.imppkg = None
 
-        elif token == "import":
-                package_name = lexer.get_token()
-                next = lexer.get_token()
-                if next != "exclude":
-                        line = ""
-                        lexer.push_token(next)
-                else:
-                        line = lexer.instream.readline().strip()
+		elif token == "version":
+			curpkg.version = lexer.get_token()
 
-                curpkg.import_pkg(package_name, line)
+		elif token == "import":
+			package_name = lexer.get_token()
+			next = lexer.get_token()
+			if next != "exclude":
+				line = ""
+				lexer.push_token(next)
+			else:
+				line = lexer.instream.readline().strip()
+
+			curpkg.import_pkg(package_name, line)
 
-        elif token == "from":
-                pkgspec = lexer.get_token()
-                p = SolarisPackage(pkg_path(pkgspec))
-                curpkg.imppkg = p
-                spkgname = p.pkginfo["PKG"]
-                svr4pkgpaths[spkgname] = pkg_path(pkgspec)
-                svr4pkgsseen[spkgname] = p;
-                curpkg.add_svr4_src(spkgname)
+		elif token == "from":
+			pkgspec = lexer.get_token()
+			p = SolarisPackage(pkg_path(pkgspec))
+			curpkg.imppkg = p
+			spkgname = p.pkginfo["PKG"]
+			svr4pkgpaths[spkgname] = pkg_path(pkgspec)
+			svr4pkgsseen[spkgname] = p;
+			curpkg.add_svr4_src(spkgname)
 
-                junk = lexer.get_token()
-                assert junk == "import"
-                in_multiline_import = True
-
-        elif token == "description":
-                curpkg.desc = lexer.get_token()
+			junk = lexer.get_token()
+			assert junk == "import"
+			in_multiline_import = True
 
-        elif token == "depend":
-                curpkg.depend.append(lexer.get_token())
+		elif token == "description":
+			curpkg.desc = lexer.get_token()
 
-        elif token == "cluster":
-                curpkg.add_svr4_src(lexer.get_token())
-
-        elif token == "idepend":
-                curpkg.idepend.append(lexer.get_token())
+		elif token == "depend":
+			curpkg.depend.append(lexer.get_token())
 
-        elif token == "undepend":
-                curpkg.undepend.append(lexer.get_token())
+		elif token == "cluster":
+			curpkg.add_svr4_src(lexer.get_token())
+
+		elif token == "idepend":
+			curpkg.idepend.append(lexer.get_token())
 
-        elif token == "add":
-                curpkg.extra.append(lexer.instream.readline().strip())
+		elif token == "undepend":
+			curpkg.undepend.append(lexer.get_token())
+
+		elif token == "add":
+			curpkg.extra.append(lexer.instream.readline().strip())
 
-        elif token == "drop":
-                f = lexer.get_token()
-                l = [o for o in curpkg.files if o.pathname == f]
-                if not l:
-                        print "Cannot drop '%s' from '%s': not found" % \
-                            (f, curpkg.name)
-                else:
-                        del curpkg.files[curpkg.files.index(l[0])]
-                        # XXX The problem here is that if we do this on a shared
-                        # file (directory, etc), then it's missing from usedlist
-                        # entirely, since we don't keep around *all* packages
-                        # delivering a shared file, just the last seen.  This
-                        # probably doesn't matter much.
-                        del usedlist[f]
-
-        elif token == "chattr":
-                fname = lexer.get_token()
-                line = lexer.instream.readline().strip()
-                try:
-                        curpkg.chattr(fname, line)
-                except Exception, e:
-                        print "Can't change attributes on " + \
-                            "'%s': not in the package" % fname, e
-                        raise
+		elif token == "drop":
+			f = lexer.get_token()
+			l = [o for o in curpkg.files if o.pathname == f]
+			if not l:
+				print "Cannot drop '%s' from '%s': not found" % \
+				    (f, curpkg.name)
+			else:
+				del curpkg.files[curpkg.files.index(l[0])]
+				# XXX The problem here is that if we do this on a shared
+				# file (directory, etc), then it's missing from usedlist
+				# entirely, since we don't keep around *all* packages
+				# delivering a shared file, just the last seen.  This
+				# probably doesn't matter much.
+				del usedlist[f]
 
-        elif token == "chattr_glob":
-                glob = lexer.get_token()
-                line = lexer.instream.readline().strip()
-                try:
-                        curpkg.chattr_glob(glob, line)
-                except Exception, e:
-                        print "Can't change attributes on " + \
-                            "'%s': no matches in the package" % \
-                            glob, e
-                        raise
+		elif token == "chattr":
+			fname = lexer.get_token()
+			line = lexer.instream.readline().strip()
+			try:
+				curpkg.chattr(fname, line)
+			except Exception, e:
+				print "Can't change attributes on " + \
+				    "'%s': not in the package" % fname, e
+				raise
 
-        elif in_multiline_import:
-                next = lexer.get_token()
-                if next == "with":
-                        # I can't imagine this is supported, but there's no
-                        # other way to read the rest of the line without a whole
-                        # lot more pain.
-                        line = lexer.instream.readline().strip()
-                else:
-                        lexer.push_token(next)
-                        line = ""
+		elif token == "chattr_glob":
+			glob = lexer.get_token()
+			line = lexer.instream.readline().strip()
+			try:
+				curpkg.chattr_glob(glob, line)
+			except Exception, e:
+				print "Can't change attributes on " + \
+				    "'%s': no matches in the package" % \
+				    glob, e
+				raise
 
-                try:
-                        curpkg.import_file(token, line)
-                except Exception, e:
-                        print "ERROR(import_file):", e
-                        raise
-        else:
-                raise "Error: unknown token '%s' (%s:%s)" % \
-                    (token, lexer.infile, lexer.lineno)
+		elif in_multiline_import:
+			next = lexer.get_token()
+			if next == "with":
+				# I can't imagine this is supported, but there's no
+				# other way to read the rest of the line without a whole
+				# lot more pain.
+				line = lexer.instream.readline().strip()
+			else:
+				lexer.push_token(next)
+				line = ""
+
+			try:
+				curpkg.import_file(token, line)
+			except Exception, e:
+				print "ERROR(import_file):", e
+				raise
+		else:
+			raise "Error: unknown token '%s' (%s:%s)" % \
+			    (token, lexer.infile, lexer.lineno)
 
 seenpkgs = set(i[0] for i in usedlist.values())
 
@@ -1007,10 +1046,10 @@
 print "New packages:\n"
 # XXX Sort these.  Preferably topologically, if possible, alphabetically
 # otherwise (for a rough progress gauge).
-if args[1:]:
+if just_these_pkgs:
         newpkgs = set(pkgdict[name] 
                       for name in pkgdict.keys() 
-                      if name in args[1:]
+                      if name in just_these_pkgs
                       )
 else:
         newpkgs = set(pkgdict.values())
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/util/distro-import/unbundleds/ClusterTools	Wed Apr 16 14:26:36 2008 -0700
@@ -0,0 +1,7 @@
+package clustertools
+version 7.1
+import SUNWompi
+import SUNWompiat
+import SUNWompimn 
+import SUNWomsc
+end package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/util/distro-import/unbundleds/NetBeans	Wed Apr 16 14:26:36 2008 -0700
@@ -0,0 +1,111 @@
+package netbeans
+version 6.0.1
+depend SUNWnetbeans-ide
+depend SUNWnetbeans-javaee
+depend SUNWnetbeans-javase
+depend SUNWnetbeans-ruby
+depend SUNWnetbeans-cpp
+depend SUNWlibnb-apisupport1
+depend SUNWlibnb-cnd1
+depend SUNWlibnb-enterprise4
+depend SUNWlibnb-ide8
+#depend SUNWlibnb-identity1
+depend SUNWlibnb-java1
+depend SUNWlibnb-platform7
+depend SUNWlibnb-profiler2
+depend SUNWlibnb-ruby1
+#depend SUNWlibnb-soa1
+#depend SUNWlibnb-uml4
+depend SUNWlibnb-visualweb1
+depend SUNWlibnb-xml1
+end package
+
+package SUNWnetbeans-ide
+version 6.0.1
+import SUNWnetbeans-ide
+end package
+
+package SUNWnetbeans-javaee
+version 6.0.1
+import SUNWnetbeans-javaee
+end package
+
+package SUNWnetbeans-javase
+version 6.0.1
+import SUNWnetbeans-javase
+end package
+
+package SUNWnetbeans-ruby
+version 6.0.1
+import SUNWnetbeans-ruby
+end package
+
+package SUNWnetbeans-cpp
+version 6.0.1
+import SUNWnetbeans-cpp
+end package
+
+package SUNWlibnb-apisupport1
+version 6.0.1
+import SUNWlibnb-apisupport1
+end package
+
+package SUNWlibnb-cnd1
+version 6.0.1
+import SUNWlibnb-cnd1
+end package
+
+package SUNWlibnb-enterprise4
+version 6.0.1
+import SUNWlibnb-enterprise4
+end package
+
+package SUNWlibnb-ide8
+version 6.0.1
+import SUNWlibnb-ide8
+end package
+
+#package SUNWlibnb-identity1
+#version 6.0.1
+#import SUNWlibnb-identity1
+#end package
+
+package SUNWlibnb-java1
+version 6.0.1
+import SUNWlibnb-java1
+end package
+
+package SUNWlibnb-platform7
+version 6.0.1
+import SUNWlibnb-platform7
+end package
+
+package SUNWlibnb-profiler2
+version 6.0.1
+import SUNWlibnb-profiler2
+end package
+
+package SUNWlibnb-ruby1
+version 6.0.1
+import SUNWlibnb-ruby1
+end package
+
+#package SUNWlibnb-soa1
+#version 6.0.1
+#import SUNWlibnb-soa1
+#end package
+
+#package SUNWlibnb-uml4
+#version 6.0.1
+#import SUNWlibnb-uml4p
+#end package
+
+package SUNWlibnb-visualweb1
+version 6.0.1
+import SUNWlibnb-visualweb1
+end package
+
+package SUNWlibnb-xml1
+version 6.0.1
+import SUNWlibnb-xml1
+end package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/util/distro-import/unbundleds/Studio	Wed Apr 16 14:26:36 2008 -0700
@@ -0,0 +1,106 @@
+package sunstudio
+description "Sun Studio Express - C, C++, & Fortran compilers and Tools"
+version 0.2008.05
+import SPROcc
+import SPROcmpl
+import SPROcpl
+import SPROcplx
+import SPROctags
+import SPROctsrc
+import SPROdbx
+import SPROdbxui
+import SPROdbxx
+#import SPROdemo
+import SPROdlight
+import SPROdmake
+import SPROdwrfb
+import SPROdwrfs
+import SPROdwrfx
+import SPROf90
+import SPROftool
+import SPROgc
+import SPROgcx
+import SPROidext
+import SPROipl
+import SPROiplg
+import SPROiplx
+import SPROjdbx
+import SPROjdbxx
+import SPROl90
+import SPROl90s
+import SPROl90sx
+import SPROl90x
+import SPROlang
+import SPROlangx
+import SPROlgc
+import SPROlgcx
+import SPROlklnt
+import SPROm9xs
+import SPROmr3m
+import SPROmrcc
+import SPROmrcom
+import SPROmrcpl
+import SPROmrdbx
+import SPROmrdmk
+import SPROmrdwf
+import SPROmrftn
+import SPROmrgc
+import SPROmride
+import SPROmripl
+import SPROmrmp
+import SPROmrpan
+import SPROmrpgn
+import SPROmrpl
+import SPROmrsbe
+import SPROmrstd
+import SPROmrtcv
+import SPROnbss
+import SPROplg
+import SPROpls
+import SPROplsx
+import SPROplx
+import SPROpnsn
+import SPROprfan
+import SPROprflb
+import SPROsbe
+import SPROsbld
+import SPROsbldx
+import SPROscl
+import SPROsclx
+import SPROsmpx
+import SPROsmsx
+import SPROstl4a
+import SPROstl4h
+import SPROstl4o
+import SPROstl4x
+import SPROstl4y
+import SPROsunms
+import SPROsvc
+import SPROsysprp
+#import SPROtdemo
+import SPROudchk
+import SPROutool
+# manually added dependencies
+depend SUNWj6cfg
+depend SUNWj6dev
+depend SUNWj6dmo
+depend SUNWj6dmx
+depend SUNWj6dvx
+depend SUNWj6man
+depend SUNWj6rt
+depend SUNWj6rtx
+depend SUNWarc
+depend SUNWcar
+depend SUNWcpp
+depend SUNWcs
+depend SUNWcsd
+depend SUNWesu
+depend SUNWhea
+depend SUNWkvm
+depend SUNWlibC
+depend SUNWlibm
+depend SUNWmlib
+depend SUNWsprot
+depend SUNWtoo
+depend SUNWxcu4t
+end package