diff options
Diffstat (limited to 'main/alpine-conf/0001-libalpine-use-correct-exit-code-in-trap.patch')
| -rw-r--r-- | main/alpine-conf/0001-libalpine-use-correct-exit-code-in-trap.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/alpine-conf/0001-libalpine-use-correct-exit-code-in-trap.patch b/main/alpine-conf/0001-libalpine-use-correct-exit-code-in-trap.patch new file mode 100644 index 0000000000..5426f62017 --- /dev/null +++ b/main/alpine-conf/0001-libalpine-use-correct-exit-code-in-trap.patch @@ -0,0 +1,30 @@ +From 6bcb2c2b0860779dc44d8dd27259f9edc6c9e6e8 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 21 Nov 2019 16:29:52 +0100 +Subject: [PATCH] libalpine: use correct exit code in trap + +save exit state before cleaning up tempdir so we get the correct exit +code. + +This fixes the problem where lbu exit with success on errors where disk +is full or similar. +--- + libalpine.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libalpine.sh.in b/libalpine.sh.in +index f3857e2..d7b79fa 100644 +--- a/libalpine.sh.in ++++ b/libalpine.sh.in +@@ -50,7 +50,7 @@ init_tmpdir() { + local __tmpd="/tmp/$PROGRAM-${$}-$(date +%s)-$RANDOM" + umask 077 || die "umask" + mkdir -p "$__tmpd" || exit 1 +- trap "rm -fr \"$__tmpd\"; exit" 0 ++ trap "rc=\$?; rm -fr \"$__tmpd\"; exit \$rc" 0 + umask $omask + eval "$1=\"$__tmpd\"" + } +-- +2.24.0 + |
