shutils/chroot.sh: fix a msg when the chroot has not been prepared yet.

This commit is contained in:
Juan RP 2011-02-26 17:56:23 +01:00
parent a867e6cf4c
commit f84a10dfae

View file

@ -29,6 +29,20 @@
#
trap "_umount && return $?" 0 INT QUIT TERM
_mount()
{
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
return $?
}
_umount()
{
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
return $?
}
[ -n "$base_chroot" ] && return 0
if [ "${chroot_cmd}" = "chroot" ]; then
@ -41,7 +55,7 @@ fi
. $XBPS_SHUTILSDIR/builddep_funcs.sh
check_installed_pkg xbps-base-chroot-0.11
if [ $? -ne 0 ]; then
echo "The '$pkgname' package requires to be installed in a chroot."
echo "${XBPS_MASTERDIR} has not been prepared for chroot operations."
echo "Please install 'xbps-base-chroot>=0.11' and try again."
exit 1
fi
@ -222,20 +236,6 @@ install_xbps_utils()
fi
}
_mount()
{
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
return $?
}
_umount()
{
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
return $?
}
xbps_chroot_handler()
{
local action="$1" pkg="$2" norm_builddir="$3" rv=0