summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2000-12-31 17:38:32 +0000
committerdmcmahill <dmcmahill>2000-12-31 17:38:32 +0000
commit7bcef34d5ac16d2a80701cf3c57d796c222ca215 (patch)
treec9c9b6e0909f8b45e60acb1a38aab7d7f7ac2015 /mk
parent4581e7adf3dbdfbd20cef62b7e952825a1fae5b3 (diff)
downloadpkgsrc-7bcef34d5ac16d2a80701cf3c57d796c222ca215.tar.gz
move the code which determines the BROKENFILE and BUILDLOG file names out
of the top level build script and into the {pre,post}-build scripts. This ensures that either of those scripts may be run directly and not rely on a variable being set by the top level script. Thanks to Hubert Feyrer for pointing out the problem in a private email. These changes do not require any user changes to the build.conf file and should be transparent to the user.
Diffstat (limited to 'mk')
-rw-r--r--mk/bulk/build18
-rw-r--r--mk/bulk/post-build14
-rw-r--r--mk/bulk/pre-build12
3 files changed, 13 insertions, 31 deletions
diff --git a/mk/bulk/build b/mk/bulk/build
index 9f1c70fe8f9..e31cf0bea2e 100644
--- a/mk/bulk/build
+++ b/mk/bulk/build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: build,v 1.6 2000/12/30 14:53:28 dmcmahill Exp $
+# $NetBSD: build,v 1.7 2000/12/31 17:38:32 dmcmahill Exp $
#
# Do builk build
#
@@ -36,22 +36,6 @@ unset DISPLAY # allow sane failure for gimp, xlispstat
cd ${USR_PKGSRC}
-# extract the name of the files used for the build log and broken build log.
-# these have defaults set by bsd.bulk-pkg.mk and may be overridden in /etc/mk.conf
-BROKENF=`( cd $USR_PKGSRC/pkgtools/pkglint ; make show-var VARNAME=BROKENFILE )`;
-export BROKENF
-if [ "$BROKENF" = "" ]; then
- echo "Had problems determining the name of the .broken.files"
- exit 1
-fi
-BLDLOG=`( cd $USR_PKGSRC/pkgtools/pkglint ; make show-var VARNAME=BUILDLOG )`;
-export BLDLOG
-if [ "$BLDLOG" = "" ]; then
- echo "Had problems determining the name of the .make.files"
- exit 1
-fi
-
-
if [ "$1" = "restart" ]; then
echo Restarting - skipping pre-build script
else
diff --git a/mk/bulk/post-build b/mk/bulk/post-build
index 33e4db51616..62e0b6838bc 100644
--- a/mk/bulk/post-build
+++ b/mk/bulk/post-build
@@ -1,5 +1,5 @@
#!/usr/pkg/bin/perl
-# $NetBSD: post-build,v 1.7 2000/12/30 14:53:28 dmcmahill Exp $
+# $NetBSD: post-build,v 1.8 2000/12/31 17:38:32 dmcmahill Exp $
#
# Collect stuff after a pkg bulk build
#
@@ -16,12 +16,6 @@ if (-f $ENV{"BULK_BUILD_CONF"}) {
$BULK_BUILD_CONF=dirname("$0")."/build.conf";
}
-# read the setting for the .broken.file from the environment (it gets put there by the
-# build script).
-$BROKENFILE=$ENV{"BROKENF"} or
-die "Error: BROKENF must be set to the name of the .broken.files\n This should have happened in the top level build script\n";
-chomp($BROKENFILE);
-
# Dig given variable out of config file, and set it
sub getconf
{
@@ -42,8 +36,11 @@ getconf("osrev"); # `uname -r`
getconf("arch"); # `uname -m`
chomp($date=`date`);
-$verbose=1;
+# extract the name of the files used for the build log and broken build log.
+# these have defaults set by bsd.bulk-pkg.mk and may be overridden in /etc/mk.conf
+chomp($BROKENFILE=`( cd $USR_PKGSRC/pkgtools/pkglint ; make show-var VARNAME=BROKENFILE )`);
+$verbose=1;
if ($verbose) {
print "\n";
@@ -52,7 +49,6 @@ if ($verbose) {
print "\n";
}
-
system("mkdir -p ${FTP}");
# Copy over the output from the build process
diff --git a/mk/bulk/pre-build b/mk/bulk/pre-build
index 752579cebe6..de595a47a0b 100644
--- a/mk/bulk/pre-build
+++ b/mk/bulk/pre-build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: pre-build,v 1.8 2000/12/30 14:53:28 dmcmahill Exp $
+# $NetBSD: pre-build,v 1.9 2000/12/31 17:38:32 dmcmahill Exp $
#
# Clean up system to be ready for bulk pkg build
#
@@ -17,14 +17,16 @@ fi
PRUNEDISTFILES=${PRUNEDISTFILES:-"yes"}
+# extract the name of the files used for the build log and broken build log.
+# these have defaults set by bsd.bulk-pkg.mk and may be overridden in /etc/mk.conf
+BROKENF=`( cd $USR_PKGSRC/pkgtools/pkglint ; make show-var VARNAME=BROKENFILE )`;
if [ "$BROKENF" = "" ]; then
- echo "Error: BROKENF must be set to the name of the .broken.files"
- echo " This should have happened in the top level build script"
+ echo "Had problems determining the name of the .broken.files"
exit 1
fi
+BLDLOG=`( cd $USR_PKGSRC/pkgtools/pkglint ; make show-var VARNAME=BUILDLOG )`;
if [ "$BLDLOG" = "" ]; then
- echo "Error: BLDLOG must be set to the name of the .make.files"
- echo " This should have happened in the top level build script"
+ echo "Had problems determining the name of the .make.files"
exit 1
fi