From 3a20f6888575be7059e9acac07d397009e98c213 Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Fri, 22 Feb 2013 13:48:57 +0100 Subject: install: cleanup properly if the strip program failed for any reason * src/install.c (strip): Indicate failure with a return code instead of terminating the program. (install_file_in_file): Handle strip's return code and unlink the created file if necessary. * tests/install/strip-program.sh: Add a test to cover the changes. * NEWS (Bug fixes): Mention the fix. Reported by John Reiser in http://bugzilla.redhat.com/632444. --- tests/install/strip-program.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/install/strip-program.sh b/tests/install/strip-program.sh index 8950d50cb..5d6537303 100755 --- a/tests/install/strip-program.sh +++ b/tests/install/strip-program.sh @@ -33,4 +33,8 @@ echo aBc > exp || fail=1 ginstall src dest -s --strip-program=./b || fail=1 compare exp dest || fail=1 +# Check that install cleans up properly if strip fails. +ginstall src dest2 -s --strip-program=./FOO && fail=1 +test -e dest2 && fail=1 + Exit $fail -- cgit v1.2.3-70-g09d2