From b7350ea957eda0f738bdbe7e74586c0c21fc3334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 14 Dec 2011 13:58:35 -0300 Subject: Make libremakepkg bind local makepkg dirs to chroot's --- libremakepkg | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/libremakepkg b/libremakepkg index bac9e30..292e4b5 100755 --- a/libremakepkg +++ b/libremakepkg @@ -22,6 +22,13 @@ source /etc/libretools.conf source /etc/makepkg.conf +# Local vars may differ from chroot's +LOCALPKGDEST=${PKGDEST} +LOCALSRCDEST=${SRCDEST} +LOCALSRCPKGDEST=${SRCPKGDEST} + +source ${CHROOTDIR}/${CHROOT}/etc/makepkg.conf + function usage { # Display message and exit echo 'cd to a dir containing a PKGBUILD and run:' @@ -42,10 +49,14 @@ function usage { # Display message and exit function buildenv { # Mounts *DEST from makepkg.conf msg "Building env" - for mp in ${SRCDEST} ${PKGDEST} ${SRCPKGDEST}; do - msg2 "binding ${mp} to ${CHROOTDIR}/${CHROOT}${mp}" - mkdir -p "${CHROOTDIR}/${CHROOT}${mp}" - mount -o bind ${mp} "${CHROOTDIR}/${CHROOT}${mp}" || exit 1 + for mp in SRCDEST PKGDEST SRCPKGDEST; do +# The host system directory + lmp=LOCAL${mp} + + msg2 "Binding ${!lmp} to ${CHROOTDIR}/${CHROOT}${!mp}" + + mkdir -p "${CHROOTDIR}/${CHROOT}${!mp}" + mount -o bind ${!lmp} "${CHROOTDIR}/${CHROOT}${!mp}" || exit 1 done } -- cgit v1.2.3