tools/userland-incorporator
changeset 1591 24aca88f3e99
parent 1517 a0e586ad53a2
child 2142 813e4817e573
--- a/tools/userland-incorporator	Tue Dec 10 08:58:01 2013 -0800
+++ b/tools/userland-incorporator	Tue Dec 10 10:52:20 2013 -0800
@@ -54,7 +54,7 @@
 				push(@packages, $package);
 			} 
 		} else {
-			die "cannot handle: ", $_;
+			die "error: cannot handle: ", $_;
 		}
 	}
 
@@ -73,6 +73,7 @@
 }
 
 my ($repository, $fmri, $summary, $description, $consolidation) = ();
+my %seen = ();
 
 $consolidation = 'userland';
 
@@ -94,8 +95,13 @@
 printf "set name=info.classification value='org.opensolaris.category.2008:Meta Packages/Incorporations'\n";
 
 @packages = enumerate_packages($repository, $consolidation, @fmris);
+
 for (@packages) {
+	if ($seen->{$_->{name}} == 1) {
+		die "error: duplicate package ", $_->{name};
+	}
 	printf "depend fmri=pkg:/%[email protected]%s-%s %s=true type=incorporate\n",
 		$_->{name}, $_->{version}, $_->{branch},
 		"facet.version-lock.".$_->{name}; 
+	$seen->{$_->{name}} = 1;
 }