summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-09-12 14:30:21 +0200
committerMichael Schroeder <mls@suse.de>2012-09-26 13:14:05 +0200
commit9e8d9d98450674a61d777be12375eb8265df91f8 (patch)
treec9fabe12b5e2e419913ec3c45e57a7c4bb48b028
parentceeae7f17dc6cf4b5ea3204a6a797825be469798 (diff)
downloadbuild-9e8d9d98450674a61d777be12375eb8265df91f8.tar.gz
build-9e8d9d98450674a61d777be12375eb8265df91f8.tar.bz2
build-9e8d9d98450674a61d777be12375eb8265df91f8.zip
- be more verbose when the preinstallimage unpack fails
-rwxr-xr-xinit_buildsystem4
1 files changed, 3 insertions, 1 deletions
diff --git a/init_buildsystem b/init_buildsystem
index 399ae50..18317c7 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -171,10 +171,12 @@ preinstall_image()
TAR="tar -x"
fi
# pipe output through perl to print a dot every 1000 lines
- if ! $TAR -z --exclude .build --exclude .init_b_cache -f "$BUILD_ROOT/.init_b_cache/rpms/$1" -v > >(perl -e '$|=1; my $done=0; $done++ % 1000 or print "." while <STDIN>; print "\n";') 2>&1 ; then
+ if ! $TAR -z --exclude .build --exclude .init_b_cache -f "$BUILD_ROOT/.init_b_cache/rpms/$1" -v > >(tee "$BUILD_ROOT/.preinstallimage.unpack" | perl -e '$|=1; my $done=0; $done++ % 1000 or print "." while <STDIN>; print "\n";') 2>&1 ; then
echo "unpack failed."
+ test -e "$BUILD_ROOT/.preinstallimage.unpack" && cat "$BUILD_ROOT/.preinstallimage.unpack"
cleanup_and_exit 1
fi
+ rm -f "$BUILD_ROOT/.preinstallimage.unpack"
}
preinstall()