pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk Abstract out the "nice -n 20" clause, so that ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/79b422d622d0
branches:  trunk
changeset: 478358:79b422d622d0
user:      agc <agc%pkgsrc.org@localhost>
date:      Thu Jul 22 14:26:42 2004 +0000

description:
Abstract out the "nice -n 20" clause, so that it can be set to something
else if desired.

Print out dates in the form: yyyy/mm/dd

diffstat:

 mk/bulk/build              |  11 ++++++++---
 mk/bulk/build.conf-example |   5 ++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (54 lines):

diff -r 01d0bd3bba70 -r 79b422d622d0 mk/bulk/build
--- a/mk/bulk/build     Thu Jul 22 14:19:39 2004 +0000
+++ b/mk/bulk/build     Thu Jul 22 14:26:42 2004 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: build,v 1.40 2004/04/29 02:23:26 dmcmahill Exp $
+# $NetBSD: build,v 1.41 2004/07/22 14:26:42 agc Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -282,6 +282,11 @@
 # make sure we have something to grep in in the build loop
 touch $BUILDLOG
 
+# set the nice level for bulk builds
+#case "${NICE_LEVEL}" in
+#"")   NICE_LEVEL="nice -n 20" ;;
+#esac
+
 # Loop over every package in the correct order.  Before building
 # each one, check to see if we've already processed this package
 # before.  This could happen if the build got interrupted and we
@@ -299,9 +304,9 @@
        if [ $? -ne 0 ]; then
                built=`wc -l $BUILDLOG | ${AWK} '{print $1}'`
                percent=`echo $built $tot | ${AWK} '{printf("%4.1f%%",$1*100/$2);}'`
-               (cd $pkgdir && nice -n 20 ${BMAKE} USE_BULK_CACHE=yes $target \
+               (cd $pkgdir && ${NICE_LEVEL} ${BMAKE} USE_BULK_CACHE=yes $target \
                        $makeargs </dev/null | \
-                       ${SED} "s;^;`date '+%m/%d/%y %H:%M:%S'`  $built/${tot}=$percent $pkgdir @ ${MACHINE_ARCH}> ;g")
+                       ${SED} "s;^;`date '+%Y/%m/%d %H:%M:%S'`  $built/${tot}=$percent $pkgdir @ ${MACHINE_ARCH}> ;g")
                echo "$pkgdir" >> $BUILDLOG
        fi
 done
diff -r 01d0bd3bba70 -r 79b422d622d0 mk/bulk/build.conf-example
--- a/mk/bulk/build.conf-example        Thu Jul 22 14:19:39 2004 +0000
+++ b/mk/bulk/build.conf-example        Thu Jul 22 14:26:42 2004 +0000
@@ -1,5 +1,5 @@
 # build.conf
-# $NetBSD: build.conf-example,v 1.20 2004/04/19 18:39:09 hubertf Exp $
+# $NetBSD: build.conf-example,v 1.21 2004/07/22 14:26:42 agc Exp $
 #
 # config file in /bin/sh syntax for {,pre,post}-build
 #
@@ -54,6 +54,9 @@
 RSYNC_DST=$CVS_USER%ftp.NetBSD.org@localhost:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/i386
 RSYNC_OPTS='-e ssh'
 
+# Nice level for builds
+NICE_LEVEL=nice -n 20
+
 ###########################################################################
 ### No changes should be needed below this line !!!
 ###########################################################################



Home | Main Index | Thread Index | Old Index