pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk Use PKG_TOOLS_BIN, so it doesn't run wrong pkg...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/17fed13880c1
branches:  trunk
changeset: 498571:17fed13880c1
user:      reed <reed%pkgsrc.org@localhost>
date:      Fri Aug 26 07:24:53 2005 +0000

description:
Use PKG_TOOLS_BIN, so it doesn't run wrong pkg_* tools found in the PATH.

diffstat:

 mk/bulk/build      |  17 ++++++++++-------
 mk/bulk/post-build |   5 +++--
 mk/bulk/pre-build  |  21 +++++++++++----------
 3 files changed, 24 insertions(+), 19 deletions(-)

diffs (147 lines):

diff -r 8140eb064b5a -r 17fed13880c1 mk/bulk/build
--- a/mk/bulk/build     Fri Aug 26 07:21:47 2005 +0000
+++ b/mk/bulk/build     Fri Aug 26 07:24:53 2005 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: build,v 1.54 2005/06/24 13:37:51 sketch Exp $
+# $NetBSD: build,v 1.55 2005/08/26 07:24:53 reed Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -207,6 +207,7 @@
        MACHINE_ARCH=`${BMAKE} show-var VARNAME=MACHINE_ARCH` || fail=yes
        OPSYS=`${BMAKE} show-var VARNAME=OPSYS` || fail=yes
        OS_VERSION=`${BMAKE} show-var VARNAME=OS_VERSION` || fail=yes
+       PKG_TOOLS_BIN=`${BMAKE} show-var VARNAME=PKG_TOOLS_BIN` || fail=yes
 else
        echo "The pkgtools/pkglint directory does not exist.  Please update"
        echo "your pkgsrc tree in ${USR_PKGSRC}"
@@ -234,6 +235,7 @@
 echo "MACHINE_ARCH    = $MACHINE_ARCH"
 echo "OPSYS           = $OPSYS"
 echo "OS_VERSION      = $OS_VERSION"
+echo "PKG_TOOLS_BIN   = $PKG_TOOLS_BIN"
 echo "----------------------------------"
 
 # make sure we have values for these very important
@@ -256,6 +258,7 @@
        -z "$PERL5" -o \
        -z "$MACHINE_ARCH" -o \
        -z "$OPSYS" -o \
+       -z "$PKG_TOOLS_BIN" -o \
        -z "$OS_VERSION" \
        ]; then
        echo "ERROR:  build failed to extract certain key variables."
@@ -328,9 +331,9 @@
 
 echo "Build finished.  Removing all installed packages left over from build..."
 
-for pkgname in `pkg_info -e \*`
+for pkgname in `${PKG_TOOLS_BIN}/pkg_info -e \*`
 do
-       pkg_info -qe $pkgname
+       ${PKG_TOOLS_BIN}/pkg_info -qe $pkgname
        if [ $? -eq 0 ]; then
                pkgdir=`${GREP} " $pkgname " $INDEXFILE | ${AWK} '{print $1}'`  
                case "${BULK_PREREQ}" in
@@ -338,12 +341,12 @@
                                echo "Keeping BULK_PREREQ: $pkgname ($pkgdir)" ;
                                ;;
                        * )
-                               echo pkg_delete -r $pkgname
-                               pkg_delete -r $pkgname
-                               pkg_info -qe $pkgname
+                               echo ${PKG_TOOLS_BIN}/pkg_delete -r $pkgname
+                               ${PKG_TOOLS_BIN}/pkg_delete -r $pkgname
+                               ${PKG_TOOLS_BIN}/pkg_info -qe $pkgname
                                if [ $? -eq 0 ]; then
                                        echo "$pkgname ($pkgdir) did not deinstall nicely.  Forcing the deinstall"
-                                       pkg_delete -f $pkgname || true
+                                       ${PKG_TOOLS_BIN}/pkg_delete -f $pkgname || true
                                fi
                                ;;
                esac
diff -r 8140eb064b5a -r 17fed13880c1 mk/bulk/post-build
--- a/mk/bulk/post-build        Fri Aug 26 07:21:47 2005 +0000
+++ b/mk/bulk/post-build        Fri Aug 26 07:24:53 2005 +0000
@@ -1,5 +1,5 @@
 #!/usr/pkg/bin/perl
-# $NetBSD: post-build,v 1.56 2005/07/17 13:38:01 ben Exp $
+# $NetBSD: post-build,v 1.57 2005/08/26 07:24:53 reed Exp $
 #
 # Collect stuff after a pkg bulk build
 #
@@ -85,6 +85,7 @@
        STARTFILE
        SUPPORTSFILE
        X11BASE
+       PKG_TOOLS_BIN
 ));
 
 my $bulkdbfile = basename($vars{BULK_DBFILE});
@@ -159,7 +160,7 @@
        {
                local $/;
                undef $/;
-               $perlfiles = `pkg_info -qL perl*`;
+               $perlfiles = `$vars{PKG_TOOLS_BIN}/pkg_info -qL perl*`;
        }
 
        my $perlfiles_pattern = $perlfiles;
diff -r 8140eb064b5a -r 17fed13880c1 mk/bulk/pre-build
--- a/mk/bulk/pre-build Fri Aug 26 07:21:47 2005 +0000
+++ b/mk/bulk/pre-build Fri Aug 26 07:24:53 2005 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: pre-build,v 1.49 2005/08/26 07:19:05 reed Exp $
+# $NetBSD: pre-build,v 1.50 2005/08/26 07:24:53 reed Exp $
 #
 # Clean up system to be ready for bulk pkg build
 #
@@ -99,6 +99,7 @@
 #
 PKG_DBDIR=`(cd ${PKGLINT_PKG_DIR}; ${BMAKE} show-var VARNAME=PKG_DBDIR)`
 DEPOTBASE=`(cd ${PKGLINT_PKG_DIR}; ${BMAKE} show-var VARNAME=DEPOTBASE)`
+PKG_TOOLS_BIN=`(cd ${PKGLINT_PKG_DIR}; ${BMAKE} show-var VARNAME=PKG_TOOLS_BIN)`
 
 for dbdir in ${PKG_DBDIR} ${DEPOTBASE}; do
        echo Removing all installed packages in $dbdir
@@ -106,9 +107,9 @@
                cd $dbdir
                for pkg in *
                do
-                       if `pkg_info -K $dbdir -qe $pkg`; then
-                               echo pkg_delete -r $pkg
-                               pkg_delete -K $dbdir -r $pkg
+                       if `${PKG_TOOLS_BIN}/pkg_info -K $dbdir -qe $pkg`; then
+                               echo ${PKG_TOOLS_BIN}/pkg_delete -r $pkg
+                               ${PKG_TOOLS_BIN}/pkg_delete -K $dbdir -r $pkg
                        fi
                done
                #
@@ -117,9 +118,9 @@
                #
                for pkg in *
                do
-                       if `pkg_info -K $dbdir -qe $pkg`; then
-                               echo pkg_delete -f $pkg
-                               pkg_delete -K $dbdir -f $pkg
+                       if `${PKG_TOOLS_BIN}/pkg_info -K $dbdir -qe $pkg`; then
+                               echo ${PKG_TOOLS_BIN}/pkg_delete -f $pkg
+                               ${PKG_TOOLS_BIN}/pkg_delete -K $dbdir -f $pkg
                        fi
                done
        
@@ -254,9 +255,9 @@
                cd $dbdir
                for pkg in *
                do
-                       if `pkg_info -K $dbdir -qe $pkg`; then
-                               echo pkg_delete -r $pkg
-                               pkg_delete -K $dbdir -r $pkg
+                       if `${PKG_TOOLS_BIN}/pkg_info -K $dbdir -qe $pkg`; then
+                               echo ${PKG_TOOLS_BIN}/pkg_delete -r $pkg
+                               ${PKG_TOOLS_BIN}/pkg_delete -K $dbdir -r $pkg
                        fi
                done
        fi



Home | Main Index | Thread Index | Old Index