shutils/chroot.sh: fix a msg when the chroot has not been prepared yet.
This commit is contained in:
parent
a867e6cf4c
commit
f84a10dfae
1 changed files with 15 additions and 15 deletions
|
@ -29,6 +29,20 @@
|
||||||
#
|
#
|
||||||
trap "_umount && return $?" 0 INT QUIT TERM
|
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
|
[ -n "$base_chroot" ] && return 0
|
||||||
|
|
||||||
if [ "${chroot_cmd}" = "chroot" ]; then
|
if [ "${chroot_cmd}" = "chroot" ]; then
|
||||||
|
@ -41,7 +55,7 @@ fi
|
||||||
. $XBPS_SHUTILSDIR/builddep_funcs.sh
|
. $XBPS_SHUTILSDIR/builddep_funcs.sh
|
||||||
check_installed_pkg xbps-base-chroot-0.11
|
check_installed_pkg xbps-base-chroot-0.11
|
||||||
if [ $? -ne 0 ]; then
|
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."
|
echo "Please install 'xbps-base-chroot>=0.11' and try again."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -222,20 +236,6 @@ install_xbps_utils()
|
||||||
fi
|
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()
|
xbps_chroot_handler()
|
||||||
{
|
{
|
||||||
local action="$1" pkg="$2" norm_builddir="$3" rv=0
|
local action="$1" pkg="$2" norm_builddir="$3" rv=0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue