Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
authorSimon Howkins <simonh@symbian.org>
Tue, 22 Sep 2009 14:16:37 +0100
changeset 484 5efa4ed4b4f8
parent 483 e72afbf7a8c9
child 485 0bed081e8249
Added special handling for utilities package, so it's zipped up with the items from the tools layer, rather than as a misc item.
common/tools/populateziptemplate.pl
--- a/common/tools/populateziptemplate.pl	Tue Sep 22 09:18:26 2009 +0100
+++ b/common/tools/populateziptemplate.pl	Tue Sep 22 14:16:37 2009 +0100
@@ -72,15 +72,32 @@
 {
 	warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
 	$package->{dst} =~ s{^/}{}g;
-	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/sf/([^/]+)/([^/]+)})
+	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/(sf|utilities)/(([^/]+)/([^/]+))?})
 	{
-  		push @{$zipConfig->{config}->{config}->{src}->{config}->{$1}->{config}},
+		my ($license, $codeline, $thingy, $layer, $packageName) = ($1, $2, $3, $5, $6);
+		# $thingy is the part of the path after the codeline. For
+		# platform packages, it's "sf". For the utilities package, it's
+		# "utilities" (the name of the package) and there's no more
+		# path.
+		#
+		# I can't think of anything to describe this item, hence $thingy
+		if ($thingy eq "utilities")
+		{
+			$layer = "tools";
+			$packageName = "utilities";
+		}
+		elsif (!defined $packageName)
+		{
+			goto MISC_PACKAGE;
+		}
+		
+  		push @{$zipConfig->{config}->{config}->{src}->{config}->{$license}->{config}},
   		{
   			set =>
   			[
   				{
   					name => "name",
-  					value=> "src_$1_$3_$4",
+  					value=> join "_", "src", $license, $layer, $packageName,
   				},
   				{
   					name => "include",
@@ -154,6 +171,7 @@
 	}
 	else
 	{
+MISC_PACKAGE:
 		(my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
 		push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},
 		{