makepkg: propagate error codes when package failed to sign correctly
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9375f49865
commit
0bc687e2e0
3 changed files with 8 additions and 4 deletions
|
@ -340,7 +340,7 @@ On exit, makepkg will return one of the following error codes.
|
||||||
Programs necessary to run makepkg are missing.
|
Programs necessary to run makepkg are missing.
|
||||||
|
|
||||||
16::
|
16::
|
||||||
Specified GPG key does not exist.
|
Specified GPG key does not exist or failed to sign package.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -47,6 +47,8 @@ create_signature() {
|
||||||
}
|
}
|
||||||
|
|
||||||
create_package_signatures() {
|
create_package_signatures() {
|
||||||
|
local ret=0
|
||||||
|
|
||||||
if [[ $SIGNPKG != 'y' ]]; then
|
if [[ $SIGNPKG != 'y' ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -59,7 +61,7 @@ create_package_signatures() {
|
||||||
pkgarch=$(get_pkg_arch $pkg)
|
pkgarch=$(get_pkg_arch $pkg)
|
||||||
pkg_file="$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}"
|
pkg_file="$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}"
|
||||||
|
|
||||||
create_signature "$pkg_file"
|
create_signature "$pkg_file" || ret=$?
|
||||||
done
|
done
|
||||||
|
|
||||||
# check if debug package needs a signature
|
# check if debug package needs a signature
|
||||||
|
@ -68,7 +70,9 @@ create_package_signatures() {
|
||||||
pkgarch=$(get_pkg_arch)
|
pkgarch=$(get_pkg_arch)
|
||||||
pkg_file="$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}"
|
pkg_file="$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}"
|
||||||
if [[ -f $pkg_file ]]; then
|
if [[ -f $pkg_file ]]; then
|
||||||
create_signature "$pkg_file"
|
create_signature "$pkg_file" || ret=$?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return $ret
|
||||||
}
|
}
|
||||||
|
|
|
@ -1481,7 +1481,7 @@ else
|
||||||
|
|
||||||
enter_fakeroot
|
enter_fakeroot
|
||||||
|
|
||||||
create_package_signatures
|
create_package_signatures || exit $E_PRETTY_BAD_PRIVACY
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if inhibiting archive creation, go no further
|
# if inhibiting archive creation, go no further
|
||||||
|
|
Loading…
Add table
Reference in a new issue