diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-21 15:41:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-21 15:42:15 +0000 |
commit | 7ebf92cda21a1f790f9a1614ebaadc7bccd7f17d (patch) | |
tree | b90ef9310c57ba4980d751bccdba997612cb50ff /main/alpine-conf | |
parent | 0e574528c919aebcc4d1e0fee4702ff9587c69b1 (diff) | |
download | aports-7ebf92cda21a1f790f9a1614ebaadc7bccd7f17d.tar.bz2 aports-7ebf92cda21a1f790f9a1614ebaadc7bccd7f17d.tar.xz |
main/alpine-conf: fix lbu exit codes on error
Diffstat (limited to 'main/alpine-conf')
-rw-r--r-- | main/alpine-conf/0001-libalpine-use-correct-exit-code-in-trap.patch | 30 | ||||
-rw-r--r-- | main/alpine-conf/APKBUILD | 6 |
2 files changed, 34 insertions, 2 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 + diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD index a4680ef2a2..1c9e25696a 100644 --- a/main/alpine-conf/APKBUILD +++ b/main/alpine-conf/APKBUILD @@ -1,13 +1,14 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=alpine-conf pkgver=3.8.3 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine configuration management scripts" url="https://git.alpinelinux.org/alpine-conf/about" arch="all" license="MIT" depends="openrc>=0.24.1-r6 busybox>=1.26.1-r3" source="https://dev.alpinelinux.org/archive/alpine-conf/alpine-conf-$pkgver.tar.xz + 0001-libalpine-use-correct-exit-code-in-trap.patch " builddir="$srcdir"/$pkgname-$pkgver @@ -24,4 +25,5 @@ package() { done } -sha512sums="73bd999b552d266c994cc1535570b86ddd7a7379f3b9e244c4985722f5754b11323a4e677cdae91fa4f0098dadd388eba679a99d98e140354ab7681bb85f9dfa alpine-conf-3.8.3.tar.xz" +sha512sums="73bd999b552d266c994cc1535570b86ddd7a7379f3b9e244c4985722f5754b11323a4e677cdae91fa4f0098dadd388eba679a99d98e140354ab7681bb85f9dfa alpine-conf-3.8.3.tar.xz +b5a4ed4e1507a6dde503edca5bc71c9f26e81e3f85dd01aa3705b300d7e9b9f48b7005250dea3105bef89a688bbf70257290e921d49534f6e6dd8848bb5b2fdb 0001-libalpine-use-correct-exit-code-in-trap.patch" |