summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill@pkgsrc.org>2000-12-30 14:53:28 +0000
committerdmcmahill <dmcmahill@pkgsrc.org>2000-12-30 14:53:28 +0000
commitda395b7a6bd4e78acffedf7e0c11246787839a40 (patch)
treef04cf725553522b570df0f9904c3ef73c99d05b7 /mk
parente633c2ff5ae58e7705b93169a43a7126c024e946 (diff)
downloadpkgsrc-da395b7a6bd4e78acffedf7e0c11246787839a40.tar.gz
further cleanup of handling the .broken.files and .make.files
- set BROKENF and BLDLOG in the 'build' script and pass those variables down to {pre,post}-build in the environment to make sure we only set them in one place. The values are determined by a make show-var VARNAME=BROKENFILE This causes the default (set in bsd.bulk-pkg.mk) or the user overridden value from /etc/mk.conf or the environment to be correctly determined. This is more robust that relying on a build.conf setting which may or may not be correctly set. - have pre-build only clean up BROKENF and BLDLOG files instead of .broken* and .make* This avoids conflicts when pkgsrc is shared among different machines.
Diffstat (limited to 'mk')
-rw-r--r--mk/bulk/build18
-rw-r--r--mk/bulk/build.conf-example4
-rw-r--r--mk/bulk/post-build9
-rw-r--r--mk/bulk/pre-build17
4 files changed, 39 insertions, 9 deletions
diff --git a/mk/bulk/build b/mk/bulk/build
index 37bf7a23549..9f1c70fe8f9 100644
--- a/mk/bulk/build
+++ b/mk/bulk/build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: build,v 1.5 2000/12/11 21:40:54 skrll Exp $
+# $NetBSD: build,v 1.6 2000/12/30 14:53:28 dmcmahill Exp $
#
# Do builk build
#
@@ -36,6 +36,22 @@ 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/build.conf-example b/mk/bulk/build.conf-example
index 7e9738046f9..ca5eded0d88 100644
--- a/mk/bulk/build.conf-example
+++ b/mk/bulk/build.conf-example
@@ -1,5 +1,5 @@
# build.conf
-# $NetBSD: build.conf-example,v 1.6 2000/12/26 16:45:57 dmcmahill Exp $
+# $NetBSD: build.conf-example,v 1.7 2000/12/30 14:53:28 dmcmahill Exp $
#
# config file in /bin/sh syntax for {,pre,post}-build
#
@@ -38,8 +38,6 @@ PRUNEDISTFILES=yes
### No changes should be needed below this line !!!
###########################################################################
-BROKENFILE=`( cd $USR_PKGSRC/pkgtools/pkglint ; make show-var VARNAME=BROKENFILE )`;
-
# Name of the (generated) HTML file which lists all broken pkgs
REPORT="$FTP/broken.html"
diff --git a/mk/bulk/post-build b/mk/bulk/post-build
index b2e5f3b884f..33e4db51616 100644
--- a/mk/bulk/post-build
+++ b/mk/bulk/post-build
@@ -1,5 +1,5 @@
#!/usr/pkg/bin/perl
-# $NetBSD: post-build,v 1.6 2000/12/30 13:05:37 hubertf Exp $
+# $NetBSD: post-build,v 1.7 2000/12/30 14:53:28 dmcmahill Exp $
#
# Collect stuff after a pkg bulk build
#
@@ -16,6 +16,12 @@ 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
{
@@ -34,7 +40,6 @@ getconf("REPORT"); # "broken.html"
getconf("USR_PKGSRC"); # "/usr/pkgsrc"
getconf("osrev"); # `uname -r`
getconf("arch"); # `uname -m`
-getconf("BROKENFILE"); # ".broken.file"
chomp($date=`date`);
$verbose=1;
diff --git a/mk/bulk/pre-build b/mk/bulk/pre-build
index 77ad3782d7d..752579cebe6 100644
--- a/mk/bulk/pre-build
+++ b/mk/bulk/pre-build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: pre-build,v 1.7 2000/12/22 01:35:33 dmcmahill Exp $
+# $NetBSD: pre-build,v 1.8 2000/12/30 14:53:28 dmcmahill Exp $
#
# Clean up system to be ready for bulk pkg build
#
@@ -17,6 +17,17 @@ fi
PRUNEDISTFILES=${PRUNEDISTFILES:-"yes"}
+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"
+ exit 1
+fi
+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"
+ exit 1
+fi
+
#
# Install cvs package and do a cvs update here
#
@@ -89,8 +100,8 @@ rm -fr /nonexistant # broken useradd on pop3d
# Clean up state files
cd ${USR_PKGSRC}
-rm -f .broken* */*/.broken*
-rm -f .make* */*/.make*
+rm -f $BROKENF */*/$BROKENF
+rm -f $BLDLOG */*/$BLDLOG
rm -f .start*
mount -o noasync -u /usr