pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk Make and mount the local patches directory whe...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cf770aa08e71
branches:  trunk
changeset: 480598:cf770aa08e71
user:      cjep <cjep%pkgsrc.org@localhost>
date:      Thu Sep 16 09:55:42 2004 +0000

description:
Make and mount the local patches directory when relevant. Fixes PR#26951
from Masanori Mikawa.

diffstat:

 mk/bulk/mksandbox |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 1991f9537950 -r cf770aa08e71 mk/bulk/mksandbox
--- a/mk/bulk/mksandbox Thu Sep 16 09:27:07 2004 +0000
+++ b/mk/bulk/mksandbox Thu Sep 16 09:55:42 2004 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mksandbox,v 1.36 2004/09/02 07:04:54 grant Exp $
+# $NetBSD: mksandbox,v 1.37 2004/09/16 09:55:42 cjep Exp $
 #
 #
 # Copyright (c) 2002 Alistair G. Crooks.  All rights reserved.
@@ -169,6 +169,8 @@
 pkg_dbdir=`(cd $pkgsrc/pkgtools/pkglint; $bmakeprog show-var VARNAME=PKG_DBDIR)`
 localpatches=`(cd $pkgsrc/pkgtools/pkglint; $bmakeprog show-var VARNAME=LOCALPATCHES)`
 
+test -d "$localpatches" || echo "WARNING: LOCALPATCHES directory does not exist - ignoring"
+
 $mkdirprog $sandbox
 cat > $sandbox_script <<EOS
 #! /bin/sh -
@@ -277,7 +279,13 @@
 $mountprog $mountflags $distfiles $sandbox/$distfiles
 echo "$packages $packages rw \\" >> $sandbox_script
 echo "$distfiles $distfiles rw \\" >> $sandbox_script
-test -n "$localpatches" && echo "$localpatches $localpatches rw \\" >> $sandbox_script
+
+if [ -n "$localpatches" ] && [ -d "$localpatches" ]; then
+       echo "Mounting $localpatches from $sandbox"
+       $mkdirprog $sandbox/$localpatches
+       $mountprog $mountflags $localpatches $sandbox/$localpatches
+       echo "$localpatches $localpatches rw \\" >> $sandbox_script
+fi
 
 cat >> $sandbox_script <<EOS
 "



Home | Main Index | Thread Index | Old Index