xbps-src: only umount bind mounts in the chroot shell fragment.

This commit is contained in:
Juan RP
2011-02-11 14:19:34 +01:00
parent 97ed70429b
commit 85543cd319
2 changed files with 8 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2008-2010 Juan Romero Pardines.
# Copyright (c) 2008-2011 Juan Romero Pardines.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -23,6 +23,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
: ${XBPS_CONFIG_FILE:=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf}
: ${progname:=$(basename $0)}
@@ -33,19 +34,6 @@
: ${xbps_machine:=$(uname -m)}
: ${XBPS_UTILS_REQVER:=20100511}
trap '_MASTERDIR=${XBPS_MASTERDIR} sighandler_exit $?' 0 INT QUIT
sighandler_exit()
{
# Always unmount in case we failed before!
if [ -z "$in_chroot" ]; then
cd ${_MASTERDIR} && \
env MASTERDIR="${_MASTERDIR}" \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
fi
exit $1
}
check_reqhost_utils()
{
[ -n "$in_chroot" ] && return 0