pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk If the bulk build is taking place in a sandbox...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cec4df922596
branches:  trunk
changeset: 503315:cec4df922596
user:      agc <agc%pkgsrc.org@localhost>
date:      Fri Nov 18 08:58:12 2005 +0000

description:
If the bulk build is taking place in a sandbox, then typically read-only
nullfs mounts are used (on NetBSD).

Only attempt to install new pkg_install tools if the bulk build is not
taking place in a sandbox.

This is a quick and dirty hack to allow sandboxed bulk builds (the majority
of cases, I suspect) to operate properly once again.

diffstat:

 mk/bulk/build |  26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diffs (41 lines):

diff -r a58824ab5d75 -r cec4df922596 mk/bulk/build
--- a/mk/bulk/build     Fri Nov 18 08:48:09 2005 +0000
+++ b/mk/bulk/build     Fri Nov 18 08:58:12 2005 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: build,v 1.76 2005/11/16 22:44:06 rillig Exp $
+# $NetBSD: build,v 1.77 2005/11/18 08:58:12 agc Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -215,16 +215,20 @@
 #
 # Check that the package tools are up to date.
 #
-( cd "${pkglint_dir}" \
-  && ${BMAKE} fetch >/dev/null 2>&1
-) || {
-       echo "Updating pkgtools"
-       ( cd "${pkgsrc_dir}/pkgtools/pkg_install" \
-         && ${BMAKE} clean \
-         && ${BMAKE} install \
-         && ${BMAKE} clean
-       ) || die "Could not update the package tools."
-}
+if [ -f /sandbox -a -x /sandbox ]; then
+       echo "Building in a sandbox - using existing pkgtools"
+else
+       ( cd "${pkglint_dir}" \
+         && ${BMAKE} fetch >/dev/null 2>&1
+       ) || {
+               echo "Updating pkgtools"
+               ( cd "${pkgsrc_dir}/pkgtools/pkg_install" \
+                 && ${BMAKE} clean \
+                 && ${BMAKE} install \
+                 && ${BMAKE} clean
+               ) || die "Could not update the package tools."
+       }
+fi
 
 #
 # Run the pre-build script if necessary.



Home | Main Index | Thread Index | Old Index