From 7e79cf73fac6fdd7d6cbfb35fe240b137e81c028 Mon Sep 17 00:00:00 2001 From: Alad Wenter Date: Sun, 20 Jan 2019 23:14:14 +0100 Subject: makepkg: propagate E_REMOVE_BUILD_DEPS remove_deps is called once, at the end of clean_up() before makepkg exit. If remove_deps returns >0 (e.g. when pressing "n" in the resulting prompt), the error is caught by the ERR signal handler. This in turns sends SIGUSR1 to the process group, with resulting exit code 138. In case remove_deps fails, this patch exits makepkg with E_REMOVE_DEPS if there was no previous error (that is, EXIT_CODE equals E_OK). Otherwise, makepkg exits with EXIT_CODE. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 756109cc..dae025c9 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -173,7 +173,11 @@ clean_up() { fi fi - remove_deps + if ! remove_deps && (( EXIT_CODE == E_OK )); then + exit $E_REMOVE_DEPS_FAILED + else + exit $EXIT_CODE + fi } enter_fakeroot() { -- cgit v1.2.3-70-g09d2