pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk Changes for enabling separate BULKFILESDIR and...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/28032d477e17
branches:  trunk
changeset: 503244:28032d477e17
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Nov 16 22:44:06 2005 +0000

description:
Changes for enabling separate BULKFILESDIR and PKGSRCDIR.

- The main .make file is stored in ${BULKFILESDIR} instead of ${PKGSRCDIR}.
- The PKGLIST variable from the configuration file is passed to the
  bulk-cache command in the environment. There are very few variables left
  that have to be exported via export_config_vars(). Maybe that function
  can be avoided alltogether.

diffstat:

 mk/bulk/build |  19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diffs (73 lines):

diff -r 23dc63e009f4 -r 28032d477e17 mk/bulk/build
--- a/mk/bulk/build     Wed Nov 16 22:37:43 2005 +0000
+++ b/mk/bulk/build     Wed Nov 16 22:44:06 2005 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: build,v 1.75 2005/11/11 10:49:41 rillig Exp $
+# $NetBSD: build,v 1.76 2005/11/16 22:44:06 rillig Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -244,6 +244,7 @@
 if cd "${pkglint_dir}"; then
        echo "Extracting relevant pkgsrc variables..."
 
+       BULKFILESDIR=`${BMAKE} show-var VARNAME=BULKFILESDIR` || fail=yes
        BULK_DBFILE=`${BMAKE} show-var VARNAME=BULK_DBFILE` || fail=yes
        DEPENDSTREEFILE=`${BMAKE} show-var VARNAME=DEPENDSTREEFILE` || fail=yes
        DEPENDSFILE=`${BMAKE} show-var VARNAME=DEPENDSFILE` || fail=yes
@@ -272,6 +273,7 @@
 echo "+----------------------------------------+"
 echo "| Some variables used in the bulk build: |"
 echo "+----------------------------------------+"
+echo "BULKFILESDIR    = $BULKFILESDIR"
 echo "BULK_DBFILE     = $BULK_DBFILE"
 echo "BULK_PREREQ     = $BULK_PREREQ"
 echo "DEPENDSTREEFILE = $DEPENDSTREEFILE"
@@ -323,6 +325,11 @@
 fi
 
 #
+# Get the location of commonly used files
+#
+main_buildlog="${BULKFILESDIR}/${BUILDLOG}"
+
+#
 # Install prerequisite packages.
 #
 # Note: we do this _before_ the depends tree because some packages like
@@ -341,7 +348,7 @@
 #
 if [ "x$restart" != "xyes" ]; then
        ( cd "${pkgsrc_dir}" \
-         && ${BMAKE} bulk-cache $makeargs
+         && env PKGLIST="${PKGLIST-}" ${BMAKE} bulk-cache $makeargs
        ) || die "Could not create the bulk build cache."
 fi
 
@@ -362,21 +369,21 @@
 # can make a progress-meter very simple to add!
 
 # make sure we have something to grep in in the build loop
-touch "${BUILDLOG}" || die "Cannot write to ${pkgsrc_dir}/${BUILDLOG}."
+touch "${main_buildlog}" || die "Cannot write to ${main_buildlog}."
 
 tot=`wc -l $ORDERFILE | ${AWK} '{print $1}'`
 for pkgdir in `cat $ORDERFILE`
 do
-       if ${GREP} -q "^${pkgdir}\$" "${BUILDLOG}"; then
+       if ${GREP} -q "^${pkgdir}\$" "${main_buildlog}"; then
                : "skip this package"
        else
-               built=`wc -l $BUILDLOG | ${AWK} '{print $1}'`
+               built=`wc -l "${main_buildlog}" | ${AWK} '{print $1}'`
                percent=`echo $built $tot | ${AWK} '{printf("%4.1f%%",$1*100/$2);}'`
                ( cd "${pkgsrc_dir}/${pkgdir}" \
                  && ${NICE_LEVEL} ${BMAKE} USE_BULK_CACHE=yes $target \
                        $makeargs </dev/null | post_filter_cmd
                ) || true
-               echo "$pkgdir" >> $BUILDLOG
+               echo "$pkgdir" >> "${main_buildlog}"
        fi
 done
 



Home | Main Index | Thread Index | Old Index