From ab988e041f2ce5e3480b31407a7cee48f024d327 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 22 Aug 2012 16:17:01 -0700 Subject: [PATCH] fastbulk - more work * Output start and end date stamps * Do a manual checksum test and delete the distfile if it fails (and the distfile is over 4 hours old). * Do a better job deleting conflicting versions of a package. --- test/fastbulk/dobuild | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/test/fastbulk/dobuild b/test/fastbulk/dobuild index 831dc54052..8d093647f9 100755 --- a/test/fastbulk/dobuild +++ b/test/fastbulk/dobuild @@ -11,15 +11,23 @@ if ( $#argv == 1 ) then set pkgwild = "`bmake show-var VARNAME=PKGWILDCARD`.lck" mkdir -p /tmp/track/locks - lockf "/tmp/track/locks/$pkgwild" /tmp/track/dobuild $argv[1] locked - exit $status + echo "FASTBULK START ${argv[1]}: `date`" + lockf "/tmp/track/locks/$pkgwild" /tmp/track/dobuild ${argv[1]} "$pkgwild" + if ( $status == 0 ) then + echo "FASTBULK SUCCESS ${argv[1]}: `date`" + exit 0 + else + echo "FASTBULK FAILURE ${argv[1]}: `date`" + exit 1 + endif endif # Get the package name and clean up any garbage that might # interfere with the build. # set pkgname = "`bmake show-var VARNAME=PKGNAME`" -set logname = $argv[1] +set logname = "$argv[1]" +set pkgwild = "$argv[2]" unsetenv PKG_PATH # Check if already installed, prevent overwrite of @@ -35,6 +43,10 @@ if ( $status == 0 ) then exit 0 endif +# Delete potential conflicts +# +pkg_delete -r "$pkgwild" + # If we already have a binary package just install # it. # @@ -57,6 +69,20 @@ foreach i ( `bmake show-var VARNAME=CONFLICTS` ) pkg_delete -r "$i" end +# If the dist file checksum fails and the dist file is over +# 4 hours old we re-download it. +# + +set dollar = '$' +set distfiles = "`bmake -V '${dollar}{DISTFILES}'`" +bmake checksum SKIP_LICENSE_CHECK=yes +if ( $status != 0 ) then + echo "Deleting distfiles ( $distfiles ) if over 4h old" + foreach dfile ( $distfiles ) + find /usr/pkgsrc/distfiles -name "$dfile" -mtime +4h -delete + end +endif + # To ensure a clean build deinstall anything that # may cause our build repackage to fail. # -- 2.41.0