From 4d55b696c30afc009f0c856a422219c84f58443e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 5 Jul 2014 16:12:14 +0200 Subject: [PATCH] xbps-src: chroot_init: do not propagate XBPS_MASTERDIR to the generated xbps-src.conf. Fixes Ypnose issue where he has XBPS_MASTERDIR set in `etc/conf`. --- common/xbps-src/shutils/chroot.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index 321c5335a51..1f22c260531 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -5,6 +5,11 @@ chroot_init() { cat > $XBPSSRC_CF <<_EOF # Generated configuration file by xbps-src, DO NOT EDIT! +_EOF + if [ -e "$XBPS_CONFIG_FILE" ]; then + grep -E '^XBPS_.*' $XBPS_CONFIG_FILE >> $XBPSSRC_CF + fi + cat >> $XBPSSRC_CF <<_EOF XBPS_MASTERDIR=/ XBPS_CFLAGS="$XBPS_CFLAGS" XBPS_CXXFLAGS="$XBPS_CXXFLAGS" @@ -12,9 +17,6 @@ XBPS_CPPFLAGS="$XBPS_CPPFLAGS" XBPS_LDFLAGS="$XBPS_LDFLAGS" XBPS_HOSTDIR=/host _EOF - if [ -n "$XBPS_CONFIG_FILE" -a -e "$XBPS_CONFIG_FILE" ]; then - grep -E '^XBPS_.*' $XBPS_CONFIG_FILE >> $XBPSSRC_CF - fi echo "# End of configuration file." >> $XBPSSRC_CF