From 96aba33d1ec353192b26c0b41097a8113f865dc6 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 26 Aug 2008 23:21:20 +0000 Subject: [PATCH] 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 --- tools/buildzip.pl | 30 +++++++++++++----------------- tools/configure | 2 +- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 88fca97625..02f26937d7 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -433,26 +433,22 @@ sub runone { # build a full install .rockbox directory buildzip($target, $fonts); - # create a zip file from the .rockbox dfir - unlink($output); - if($verbose) { - print "$ziptool $output .rockbox >/dev/null\n"; - } - system("$ziptool $output .rockbox >/dev/null"); - if($target && ($fonts != 1)) { - # On some targets, rockbox.* is inside .rockbox - if($target !~ /(mod|ajz|wma)\z/i) { - copy("$target", ".rockbox/$target"); - $target = ".rockbox/".$target; - } - - if($verbose) { - print "$ziptool $output $target >/dev/null\n"; - } - system("$ziptool $output $target >/dev/null"); + if($fonts == 1) { + # Don't include image file in fonts-only package + undef $target; } + 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 rmtree('.rockbox'); diff --git a/tools/configure b/tools/configure index 327ae15230..728d4d39fd 100755 --- a/tools/configure +++ b/tools/configure @@ -2346,7 +2346,7 @@ fullzip: tar: \$(SILENT)rm -f rockbox.tar \$(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 \$(SILENT)bzip2 -f9 rockbox.tar