From 89dec60e64da058a56525f0e50510ddb29774eba Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 11 Jul 2011 00:16:02 +0200 Subject: [PATCH] xbps-src: avoid mkdir {build,dest}dir in /. --- xbps-src/shutils/init_funcs.sh.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xbps-src/shutils/init_funcs.sh.in b/xbps-src/shutils/init_funcs.sh.in index bcb8c8da95e..ec2299c6f06 100644 --- a/xbps-src/shutils/init_funcs.sh.in +++ b/xbps-src/shutils/init_funcs.sh.in @@ -63,7 +63,11 @@ set_defvars() for i in DESTDIR PACKAGESDIR BUILDDIR SRCDISTDIR; do eval val="\$XBPS_$i" - [ ! -d "$val" ] && mkdir -p $val + if [ ! -d "$val" ]; then + mdir=$(dirname $XBPS_MASTERDIR) + [ -z "$IN_CHROOT" -a "$mdir" = "/" ] && continue + mkdir -p $val + fi done xver=$(xbps-bin.static -V|awk '{print $2}')