pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/bulk by default don't try to include src and xsrc i...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2a3d29b4fc36
branches: trunk
changeset: 492905:2a3d29b4fc36
user: dmcmahill <dmcmahill%pkgsrc.org@localhost>
date: Thu Apr 21 21:44:56 2005 +0000
description:
by default don't try to include src and xsrc in the list of things to
mount in the sandbox. Then in the individual OS section, turn it back
on if needed. Right now, just turn on NetBSD. At some point we should
probably fill out the other supported OS's or figure out a way to pull
in the information from the makefiles which already define much of whats
needed.
diffstat:
mk/bulk/mksandbox | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diffs (78 lines):
diff -r 59784aa37b5d -r 2a3d29b4fc36 mk/bulk/mksandbox
--- a/mk/bulk/mksandbox Thu Apr 21 17:40:19 2005 +0000
+++ b/mk/bulk/mksandbox Thu Apr 21 21:44:56 2005 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: mksandbox,v 1.39 2005/02/10 03:20:00 grant Exp $
+# $NetBSD: mksandbox,v 1.40 2005/04/21 21:44:56 dmcmahill Exp $
#
#
# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
@@ -60,6 +60,10 @@
exit 1
}
+# by default, don't require src and xsrc to be available
+need_src=no
+need_xsrc=no
+
opsys=`uname -s`
case "$opsys" in
Darwin)
@@ -102,6 +106,8 @@
mountprog=/sbin/mount
paxprog=/bin/pax
sedprog=/usr/bin/sed
+ need_src=yes
+ need_xsrc=yes
;;
SunOS)
bmakeprog=bmake
@@ -158,11 +164,11 @@
err "pkgsrc directory $pkgsrc does not exist."
fi
-if [ ! -d $src ]; then
+if [ ! -d $src -a "$need_src" = "yes" ]; then
err "source directory $src does not exist."
fi
-if [ ! -d $xsrc ]; then
+if [ ! -d $xsrc -a "$need_xsrc" = "yes" ]; then
err "xsrc directory $xsrc does not exist."
fi
@@ -268,20 +274,24 @@
$cpprog /dev/null $sandbox$f
done
-echo "Mount $src from $sandbox"
-$mkdirprog $sandbox/usr/src
-$mountprog $mountflags -r $src $sandbox/usr/src
-echo "$src /usr/src ro \\" >> $sandbox_script
+if [ "$need_src" = "yes" ]; then
+ echo "Mount $src from $sandbox"
+ $mkdirprog $sandbox/usr/src
+ $mountprog $mountflags -r $src $sandbox/usr/src
+ echo "$src /usr/src ro \\" >> $sandbox_script
+fi
echo "Mount $pkgsrc from $sandbox"
$mkdirprog $sandbox/usr/pkgsrc
$mountprog $mountflags $pkgsrc $sandbox/usr/pkgsrc
echo "$pkgsrc /usr/pkgsrc rw \\" >> $sandbox_script
-echo "Mount $xsrc from $sandbox"
-$mkdirprog $sandbox/usr/xsrc
-$mountprog $mountflags -r $xsrc $sandbox/usr/xsrc
-echo "$xsrc /usr/xsrc ro \\" >> $sandbox_script
+if [ "$need_xsrc" = "yes" ]; then
+ echo "Mount $xsrc from $sandbox"
+ $mkdirprog $sandbox/usr/xsrc
+ $mountprog $mountflags -r $xsrc $sandbox/usr/xsrc
+ echo "$xsrc /usr/xsrc ro \\" >> $sandbox_script
+fi
echo "Mounting $packages and $distfiles from $sandbox"
$mkdirprog $sandbox/$packages $sandbox/$distfiles
Home |
Main Index |
Thread Index |
Old Index