Skip to content
Snippets Groups Projects
Commit fbb2bd2b authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig) Committed by Pierre Schmitz
Browse files

Fix return code handling


Stop trap_exit from forcing a 0 exit code. This fixes makechrootpkg,
which used to always return success, even if the build failed.

Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent d5c6bc76
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ trap_abort() {
trap_exit() {
trap - EXIT INT QUIT TERM HUP
cleanup 0
cleanup
}
die() {
......
......@@ -213,12 +213,12 @@ if ! grep -q 'SRCDEST="/srcdest"' "$copydir/etc/makepkg.conf"; then
echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf"
fi
if [[ -n $MAKEFLAGS ]]; then
if [[ -n $MAKEFLAGS ]]; then
sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf"
echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf"
fi
if [[ -n $PACKAGER ]]; then
if [[ -n $PACKAGER ]]; then
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
fi
......
......@@ -160,7 +160,8 @@ copy_hostconf () {
}
trap_chroot_umount () {
trap 'trap_exit' EXIT INT QUIT TERM HUP
trap 'trap_abort' INT QUIT TERM HUP
trap 'trap_exit' EXIT
for cache_dir in ${cache_dirs[@]}; do
umount "${working_dir}/${cache_dir}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment