Skip to content

Commit

Permalink
- be more verbose when the preinstallimage unpack fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Sep 26, 2012
1 parent ceeae7f commit 9e8d9d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init_buildsystem
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9e8d9d9

Please sign in to comment.