# HG changeset patch # User Simon Howkins # Date 1251888212 -3600 # Node ID 2ab990de5a2320068d68d0b83ddc46f8d5a4e3c5 # Parent 1c8af9baa8a774d0dbdd696d446dc11a83204510 Bug 299 populateziptemplate.pl aborts if it cannot determine the license for a source component Source that cannot be sorted correctly into any other category is treated as "misc" diff -r 1c8af9baa8a7 -r 2ab990de5a23 common/templates/zip.cfg.xml.ftl.template --- a/common/templates/zip.cfg.xml.ftl.template Thu Jul 23 17:59:02 2009 +0100 +++ b/common/templates/zip.cfg.xml.ftl.template Wed Sep 02 11:43:32 2009 +0100 @@ -37,6 +37,9 @@ + + + diff -r 1c8af9baa8a7 -r 2ab990de5a23 common/tools/populateziptemplate.pl --- a/common/tools/populateziptemplate.pl Thu Jul 23 17:59:02 2009 +0100 +++ b/common/tools/populateziptemplate.pl Wed Sep 02 11:43:32 2009 +0100 @@ -70,8 +70,7 @@ my $xml = XML::Simple->new(); my $zipConfig = $xml->XMLin($template, keyattr => $keyAttr); my @allRndFiles; - -my $failures = 0; +my $miscCount = 0; # For each package in CSV... foreach my $package (@packages) @@ -142,8 +141,23 @@ } else { - warn "Cannot determine license for '$package->{source}'\n"; - $failures++; + (my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g; + push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}}, + { + set => + [ + { + name => "name", + value=> "src_misc_$dest2"."_$miscCount", + }, + { + name => "include", + value => "$package->{dst}/**", + }, + ] + }; + $miscCount++; + warn "Warning: Cannot determine license for '$package->{source}' - it will be packaged as 'src_misc_$dest2"."_$miscCount'\n"; } } @@ -158,4 +172,3 @@ print $fh @allRndFiles; close $fh; -exit($failures);