Fix FS #9280 (bsd tar errors out when called with -u and the destination file doesn't exist) by using -c. This requires buildzip.pl to only call the archiver once, with the additional beneft that it's more efficient (saves a call, and allows 7zip archives to become smaller).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18350 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2008-08-26 23:21:20 +00:00
parent 32c65bb203
commit 96aba33d1e
2 changed files with 14 additions and 18 deletions

View file

@ -433,26 +433,22 @@ sub runone {
# build a full install .rockbox directory # build a full install .rockbox directory
buildzip($target, $fonts); buildzip($target, $fonts);
# create a zip file from the .rockbox dfir
unlink($output); unlink($output);
if($verbose) {
print "$ziptool $output .rockbox >/dev/null\n";
}
system("$ziptool $output .rockbox >/dev/null");
if($target && ($fonts != 1)) { if($fonts == 1) {
# On some targets, rockbox.* is inside .rockbox # Don't include image file in fonts-only package
if($target !~ /(mod|ajz|wma)\z/i) { undef $target;
copy("$target", ".rockbox/$target");
$target = ".rockbox/".$target;
}
if($verbose) {
print "$ziptool $output $target >/dev/null\n";
}
system("$ziptool $output $target >/dev/null");
} }
if($target && ($target !~ /(mod|ajz|wma)\z/i)) {
# On some targets, the image goes into .rockbox.
copy("$target", ".rockbox/$target");
undef $target;
}
if($verbose) {
print "$ziptool $output .rockbox $target >/dev/null\n";
}
system("$ziptool $output .rockbox $target >/dev/null");
# remove the .rockbox afterwards # remove the .rockbox afterwards
rmtree('.rockbox'); rmtree('.rockbox');

2
tools/configure vendored
View file

@ -2346,7 +2346,7 @@ fullzip:
tar: tar:
\$(SILENT)rm -f rockbox.tar \$(SILENT)rm -f rockbox.tar
\$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\ \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done; \\
\$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar -uf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY) \$(TOOLSDIR)/buildzip.pl \$(VERBOSEOPT) -t \"\$(MODELNAME)\$\$feat\" -i \"\$(TARGET_ID)\" -o "rockbox.tar" -z "tar -cf" -r "\$(ROOTDIR)" \$(TARGET) \$(BINARY)
bzip2: tar bzip2: tar
\$(SILENT)bzip2 -f9 rockbox.tar \$(SILENT)bzip2 -f9 rockbox.tar