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 BULKFILESDIR differs from PKGSRCDIR, ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e728d4545de1
branches: trunk
changeset: 503420:e728d4545de1
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Nov 20 11:18:45 2005 +0000
description:
- 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:
mk/bulk/build | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (60 lines):
diff -r 4d928d438ae4 -r e728d4545de1 mk/bulk/build
--- a/mk/bulk/build Sun Nov 20 11:09:19 2005 +0000
+++ b/mk/bulk/build Sun Nov 20 11:18:45 2005 +0000
@@ -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@localhost>
@@ -259,6 +259,7 @@
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 "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 @@
-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 @@
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 @@
( 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
#
Home |
Main Index |
Thread Index |
Old Index