From 0bc687e2e01f4e6e3f2a2f7ac10c7e1fdbaf5ba2 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 16 Apr 2019 13:36:12 -0400 Subject: makepkg: propagate error codes when package failed to sign correctly Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/libmakepkg/integrity/generate_signature.sh.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/libmakepkg/integrity') diff --git a/scripts/libmakepkg/integrity/generate_signature.sh.in b/scripts/libmakepkg/integrity/generate_signature.sh.in index e6ff3b1b..b6138824 100644 --- a/scripts/libmakepkg/integrity/generate_signature.sh.in +++ b/scripts/libmakepkg/integrity/generate_signature.sh.in @@ -47,6 +47,8 @@ create_signature() { } create_package_signatures() { + local ret=0 + if [[ $SIGNPKG != 'y' ]]; then return 0 fi @@ -59,7 +61,7 @@ create_package_signatures() { pkgarch=$(get_pkg_arch $pkg) pkg_file="$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}" - create_signature "$pkg_file" + create_signature "$pkg_file" || ret=$? done # check if debug package needs a signature @@ -68,7 +70,9 @@ create_package_signatures() { pkgarch=$(get_pkg_arch) pkg_file="$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}" if [[ -f $pkg_file ]]; then - create_signature "$pkg_file" + create_signature "$pkg_file" || ret=$? fi fi + + return $ret } -- cgit v1.2.3-70-g09d2