Fix 'xbps-src -m' to mount stuff in the correct place.

--HG--
extra : convert_revision : 930efb41ec285f2b65310629fe758397c178d681
This commit is contained in:
Juan RP 2010-04-27 21:52:36 +02:00
parent 9ddcd8fe72
commit da63915397
2 changed files with 12 additions and 3 deletions

View File

@ -31,6 +31,10 @@ HANDLER="$1"
. @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
if [ -n "${MASTERDIR}" ]; then
export XBPS_MASTERDIR="${MASTERDIR}"
fi
REQFS="sys proc dev xbps"
mount_chroot_fs()

View File

@ -153,7 +153,7 @@ prepare_binpkg_repos()
if [ ! -f "$XBPS_MASTERDIR/.xbps_added_local_repo" ]; then
msg_normal "Registering local binpkg repo..."
${chroot_cmd} $XBPS_MASTERDIR \
xbps-repo.static add /xbps_packagesdir
${XBPS_REPO_CMD} add /xbps_packagesdir
[ $? -eq 0 ] && touch -f $XBPS_MASTERDIR/.xbps_added_local_repo
fi
}
@ -222,8 +222,11 @@ xbps_chroot_handler()
create_binsh_symlink
create_busybox_links
install_xbps_utils
${sudo_cmd} @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
[ $? -ne 0 ] && return $?
if [ -n "$XBPS_PREFER_BINPKG_DEPS" ]; then
prepare_binpkg_repos
fi
@ -249,6 +252,8 @@ xbps_chroot_handler()
"cd /xbps/srcpkgs/$pkg && xbps-src $action"
fi
msg_normal "Exiting from the chroot on $XBPS_MASTERDIR."
${sudo_cmd} @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
return $?
}