summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig>2005-11-20 11:18:45 +0000
committerrillig <rillig>2005-11-20 11:18:45 +0000
commita55bc0bd45d22a4519c9e4504aac52cb5348da45 (patch)
treec0c528b28c3c4f3258c87528edfe5ea3088fa44b /mk
parent9b79e8e19b90b1664f6bb11a3315152d223a305a (diff)
downloadpkgsrc-a55bc0bd45d22a4519c9e4504aac52cb5348da45.tar.gz
- If the BULKFILESDIR differs from PKGSRCDIR, create it before trying to
create log files in it. - Fail early if the ORDERFILE does not exist. (As this program is not in "set -e" mode, it had continued without error checking, which resulted in _many_ error messages.)
Diffstat (limited to 'mk')
-rw-r--r--mk/bulk/build17
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/bulk/build b/mk/bulk/build
index 1a9a55d8cc6..5d0df84dc15 100644
--- a/mk/bulk/build
+++ b/mk/bulk/build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: build,v 1.81 2005/11/19 17:31:40 rillig Exp $
+# $NetBSD: build,v 1.82 2005/11/20 11:18:45 rillig Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@@ -259,6 +259,7 @@ if cd "${pkglint_dir}"; then
GREP=`${BMAKE} show-var VARNAME=GREP USE_TOOLS=grep` || fail=yes
SED=`${BMAKE} show-var VARNAME=SED USE_TOOLS=sed` || fail=yes
MAIL_CMD=`${BMAKE} show-var VARNAME=MAIL_CMD USE_TOOLS=mail` || fail=yes
+ MKDIR=`${BMAKE} show-var VARNAME=MKDIR USE_TOOLS=mkdir` || fail=yes
PERL5=`${BMAKE} show-var VARNAME=PERL5 USE_TOOLS=perl` || fail=yes
MACHINE_ARCH=`${BMAKE} show-var VARNAME=MACHINE_ARCH` || fail=yes
OPSYS=`${BMAKE} show-var VARNAME=OPSYS` || fail=yes
@@ -287,6 +288,7 @@ echo "BUILDLOG = $BUILDLOG"
echo "STARTFILE = $STARTFILE"
echo "AWK = $AWK"
echo "GREP = $GREP"
+echo "MKDIR = $MKDIR"
echo "SED = $SED"
echo "MAIL_CMD = $MAIL_CMD"
echo "PERL5 = $PERL5"
@@ -311,6 +313,7 @@ if [ $fail = "yes" -o \
-z "$STARTFILE" -o \
-z "$AWK" -o \
-z "$GREP" -o \
+ -z "$MKDIR" -o \
-z "$SED" -o \
-z "$MAIL_CMD" -o \
-z "$PERL5" -o \
@@ -330,6 +333,13 @@ fi
main_buildlog="${BULKFILESDIR}/${BUILDLOG}"
#
+# Create the directory for the log files if necessary
+#
+if [ "${BULKFILESDIR}" != "${pkgsrc_dir}" ]; then
+ ${MKDIR} "${BULKFILESDIR}"
+fi
+
+#
# Install prerequisite packages.
#
# Note: we do this _before_ the depends tree because some packages like
@@ -350,6 +360,11 @@ if [ "x$restart" != "xyes" ]; then
( cd "${pkgsrc_dir}" \
&& env PKGLIST="${PKGLIST-}" ${BMAKE} bulk-cache $makeargs
) || die "Could not create the bulk build cache."
+else
+ if [ ! -f "${ORDERFILE}" ]; then
+ die "The ${ORDERFILE} does not exist." \
+ "(You cannot resume a bulk build that has not yet started.)"
+ fi
fi
#