17621943 move to build 32 breaks userland-incorporation
authorMike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 21 Oct 2013 11:13:54 -0700
changeset 1517 a0e586ad53a2
parent 1516 e0b42d30e1a3
child 1518 4dc3f734af5e
17621943 move to build 32 breaks userland-incorporation
tools/userland-incorporator
--- a/tools/userland-incorporator	Fri Oct 18 14:06:25 2013 -0600
+++ b/tools/userland-incorporator	Mon Oct 21 11:13:54 2013 -0700
@@ -19,7 +19,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 #
 # incorporator - an utility to incorporate packages in a repo
@@ -38,8 +38,11 @@
 	while (<$fp>) {
 
 		# lines should be in the form:
-		#   publisher   package   [r|o] version,branch:timestamp
-		if (/^(\S+)\s+(\S+)\s+\S?\s+([\d.]+),[\d.]+-([\d.]+):.+$/) {
+		#   publisher   package   [r|o] version,5.12-branch:timestamp
+		# or lines should be in the form:
+		#   publisher   package   [r|o] version-branch:timestamp
+		if ((/^(\S+)\s+(\S+)\s+\S?\s+([\d.]+),[\d.]+-([\d.]+):.+$/) ||
+		   (/^(\S+)\s+(\S+)\s+\S?\s+([\d.]+)-([\d.]+):.+$/)) { 
 			my ($package) = ();
 
 			$package->{publisher} = $1;
@@ -47,9 +50,11 @@
 			$package->{version} = $3;
 			$package->{branch} = $4;
 
-			push(@packages, $package);
+			if ($package->{name} !~ m/incorporation/) {
+				push(@packages, $package);
+			} 
 		} else {
-			printf STDERR "SKIP: %s", $_;
+			die "cannot handle: ", $_;
 		}
 	}
 
@@ -91,6 +96,6 @@
 @packages = enumerate_packages($repository, $consolidation, @fmris);
 for (@packages) {
 	printf "depend fmri=pkg:/%s@%s-%s %s=true type=incorporate\n",
-		%$_->{name}, %$_->{version}, %$_->{branch},
-		"facet.version-lock.".%$_->{name};
+		$_->{name}, $_->{version}, $_->{branch},
+		"facet.version-lock.".$_->{name}; 
 }