From da63915397937421559b18ed9754fb7824162996 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 27 Apr 2010 21:52:36 +0200 Subject: [PATCH] Fix 'xbps-src -m' to mount stuff in the correct place. --HG-- extra : convert_revision : 930efb41ec285f2b65310629fe758397c178d681 --- xbps-src/libexec/xbps-src-chroot-helper.sh.in | 4 ++++ xbps-src/shutils/chroot.sh.in | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/xbps-src/libexec/xbps-src-chroot-helper.sh.in b/xbps-src/libexec/xbps-src-chroot-helper.sh.in index b4c287fb9d0..f69f5ebd356 100644 --- a/xbps-src/libexec/xbps-src-chroot-helper.sh.in +++ b/xbps-src/libexec/xbps-src-chroot-helper.sh.in @@ -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() diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index 62b870a1623..ebb70a6de60 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -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 $? }