xbps-src: be more conservative with signal handlers.

This commit is contained in:
Juan RP 2010-12-28 22:55:17 +01:00
parent 7f4fd901e3
commit f832dd42a8
3 changed files with 5 additions and 6 deletions

View File

@ -28,7 +28,7 @@
# Actually this needs the xbps-base-chroot package installed. # Actually this needs the xbps-base-chroot package installed.
# #
trap "echo && chroot_handler_interrupted $?" INT QUIT TERM KILL trap "echo && chroot_handler_interrupted $?" INT QUIT TERM
[ -n "$base_chroot" ] && return 0 [ -n "$base_chroot" ] && return 0

View File

@ -124,14 +124,14 @@ install_pkg()
# Always write metadata to package's destdir. # Always write metadata to package's destdir.
. $XBPS_SHUTILSDIR/metadata.sh . $XBPS_SHUTILSDIR/metadata.sh
trap 'remove_pkgdestdir_sighandler ${pkgname}' 0 INT trap 'remove_pkgdestdir_sighandler ${pkgname}' INT
xbps_write_metadata_pkg xbps_write_metadata_pkg
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
msg_red "cannot write package metadata for '$pkgname'!\n" msg_red "cannot write package metadata for '$pkgname'!\n"
trap '' 0 INT trap - INT
return 1 return 1
fi fi
trap '' 0 INT trap - INT
[ "$install_destdir_target" = "yes" ] && return 0 [ "$install_destdir_target" = "yes" ] && return 0

View File

@ -43,8 +43,7 @@ sighandler_exit()
env MASTERDIR="${_MASTERDIR}" \ env MASTERDIR="${_MASTERDIR}" \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
fi fi
[ -n "$1" ] && exit $1 exit $1
exit $?
} }
check_reqhost_utils() check_reqhost_utils()