chroot: do not umount unnecessarily in the build target.

--HG--
extra : convert_revision : bb005f7c4dae217282a231eea9f71869479b97d2
This commit is contained in:
Juan RP 2008-10-27 08:35:40 +01:00
parent cb98b31ee8
commit 40a6d63364
2 changed files with 9 additions and 4 deletions

View File

@ -13,6 +13,10 @@ if [ $? -ne 0 ]; then
fi
if [ "$(id -u)" -ne 0 ]; then
if [ -z "$base_chroot" ]; then
echo "*** ERROR: this package must be built inside of the chroot ***"
exit 1
fi
echo "*** ERROR: you must be root to use this target ***"
exit 1
fi
@ -82,7 +86,6 @@ configure_chroot_pkg()
rebuild_ldso_cache
env in_chroot=yes chroot $XBPS_MASTERDIR /xbps/xbps.sh configure $pkg
echo "==> Exiting from the chroot on $XBPS_MASTERDIR."
umount_chroot_fs
}
build_chroot_pkg()
@ -94,7 +97,6 @@ build_chroot_pkg()
rebuild_ldso_cache
env in_chroot=yes chroot $XBPS_MASTERDIR /xbps/xbps.sh build $pkg
echo "==> Exiting from the chroot on $XBPS_MASTERDIR."
umount_chroot_fs
}
install_chroot_pkg()

View File

@ -55,7 +55,6 @@ Targets:
extract Extract distribution file(s) into build directory.
fetch Download distribution file(s).
info Show information about <package_name>.
install-chroot Installs a package inside a chroot.
install-destdir build + configure + install into destdir.
install install-destdir + stow.
list Lists all currently installed packages.
@ -128,7 +127,7 @@ run_func()
[ -z "$func" ] && return 1
type -t $func | grep -q 'shell function'
type -t $func | grep -q 'function'
[ $? -eq 0 ] && $func
}
@ -341,6 +340,8 @@ extract_distfiles()
local ltar_cmd=
local f=
[ -f $XBPS_EXTRACT_DONE ] && return 0
#
# If we are being called via the target, just extract and return.
#
@ -1506,6 +1507,7 @@ build)
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then
run_file $XBPS_TMPLHELPDIR/chroot.sh
build_chroot_pkg $2
umount_chroot_fs
else
build_src_phase $2
fi
@ -1523,6 +1525,7 @@ configure)
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then
run_file $XBPS_TMPLHELPDIR/chroot.sh
configure_chroot_pkg $2
umount_chroot_fs
else
configure_src_phase $2
fi