diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2005-04-21 21:44:56 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2005-04-21 21:44:56 +0000 |
commit | 03bee4e9619791ca9beae86feaa2a435dce86a18 (patch) | |
tree | 43a3b3bd0a597482ad30c8e9d5c6f52517d4d766 /mk | |
parent | 4248ca49f20225c7893262a3ca8f68e9093c6a8d (diff) | |
download | pkgsrc-03bee4e9619791ca9beae86feaa2a435dce86a18.tar.gz |
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 (limited to 'mk')
-rwxr-xr-x | mk/bulk/mksandbox | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/mk/bulk/mksandbox b/mk/bulk/mksandbox index e94306aed02..f42642f152d 100755 --- a/mk/bulk/mksandbox +++ b/mk/bulk/mksandbox @@ -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 @@ err() 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 @@ NetBSD) mountprog=/sbin/mount paxprog=/bin/pax sedprog=/usr/bin/sed + need_src=yes + need_xsrc=yes ;; SunOS) bmakeprog=bmake @@ -158,11 +164,11 @@ if [ ! -d $pkgsrc ]; then 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 @@ for f in $sandboxEmptyFiles; do $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 |