pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Update pkg_chk to 1.46:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/db49472778a7
branches:  trunk
changeset: 472330:db49472778a7
user:      abs <abs%pkgsrc.org@localhost>
date:      Thu Apr 08 18:48:53 2004 +0000

description:
Update pkg_chk to 1.46:
    - Fix nawk issues (NetBSD-2.0 and Solaris) - Fixes PR pkg/24931
    - Fix inverted -k test when generating list of binary packages
    - Misc cleanup & removal of debugging entry

diffstat:

 doc/CHANGES                       |   4 ++-
 pkgtools/pkg_chk/Makefile         |   4 +-
 pkgtools/pkg_chk/files/pkg_chk.sh |  52 ++++++++++++++++++---------------------
 3 files changed, 29 insertions(+), 31 deletions(-)

diffs (220 lines):

diff -r 673d5d9e2bc7 -r db49472778a7 doc/CHANGES
--- a/doc/CHANGES       Thu Apr 08 18:08:52 2004 +0000
+++ b/doc/CHANGES       Thu Apr 08 18:48:53 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.5485 2004/04/08 14:29:49 xtraeme Exp $
+$NetBSD: CHANGES,v 1.5486 2004/04/08 18:49:44 abs Exp $
 
 Changes to the packages collection and infrastructure in 2004:
 
@@ -1846,3 +1846,5 @@
        Updated memtest86 to 3.1a [ben 2004-04-08]
        Added gmime-2.1.3 [recht 2004-04-08]
        Added columba-1.0M2 [xtraeme 2004-04-08]
+       Updated pkg_chk to 1.46 [abs 2004-04-08]
+
diff -r 673d5d9e2bc7 -r db49472778a7 pkgtools/pkg_chk/Makefile
--- a/pkgtools/pkg_chk/Makefile Thu Apr 08 18:08:52 2004 +0000
+++ b/pkgtools/pkg_chk/Makefile Thu Apr 08 18:48:53 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2004/03/29 03:31:26 schmonz Exp $
+# $NetBSD: Makefile,v 1.3 2004/04/08 18:48:53 abs Exp $
 
-DISTNAME=      pkg_chk-1.45
+DISTNAME=      pkg_chk-1.46
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 673d5d9e2bc7 -r db49472778a7 pkgtools/pkg_chk/files/pkg_chk.sh
--- a/pkgtools/pkg_chk/files/pkg_chk.sh Thu Apr 08 18:08:52 2004 +0000
+++ b/pkgtools/pkg_chk/files/pkg_chk.sh Thu Apr 08 18:48:53 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -e
 #
-# $Id: pkg_chk.sh,v 1.2 2004/03/27 07:54:34 grant Exp $
+# $Id: pkg_chk.sh,v 1.3 2004/04/08 18:48:53 abs Exp $
 #
 # TODO: Handle updates with dependencies via binary packages
 
@@ -30,8 +30,8 @@
        fi
        if [ ! -d $PKG_DBDIR/$PKGNAME ];then
            echo_n "$PKGNAME: "
-           pkg=`echo $PKGNAME | sed 's/-[0-9].*//'`
-           pkginstalled=`sh -c "${PKG_INFO} -e $pkg" || true`
+           pkg=$(echo $PKGNAME | sed 's/-[0-9].*//')
+           pkginstalled=$(sh -c "${PKG_INFO} -e $pkg" || true)
            INSTALL=
            if [ -n "$pkginstalled" ];then
                echo_n "version mismatch - $pkginstalled"
@@ -47,8 +47,8 @@
            echo
        else
            if [ -n "$opt_B" ];then
-               current_build_ver=`get_build_ver`
-               installed_build_ver=`sed "s|^[^:]*/[^:]*:||" $PKG_DBDIR/$PKGNAME/+BUILD_VERSION`
+               current_build_ver=$(get_build_ver)
+               installed_build_ver=$(sed "s|^[^:]*/[^:]*:||" $PKG_DBDIR/$PKGNAME/+BUILD_VERSION)
                if [ x"$current_build_ver" != x"$installed_build_ver" ];then
                    echo "$PKGNAME: build version information mismatch"
                    MISMATCH_TODO="$MISMATCH_TODO $PKGNAME"
@@ -80,7 +80,7 @@
        fi
        if [ ! -f $PACKAGES/All/$PKGNAME.tgz ] ;then
            echo " ** $PKGNAME - binary package missing"
-           if [ -n "$opt_k" ];then
+           if [ -z "$opt_k" ];then
                exit 1
            fi
            continue
@@ -89,10 +89,6 @@
            echo "$PKGNAME.tgz: found"
        fi
        CHECKLIST="$CHECKLIST$PKGNAME ";
-       if [ $PKGNAME = 'samba-2.2.8anb4.tgz' ] ; then
-           echo XXX
-           break
-       fi
     done
     while [ "$CHECKLIST" != ' ' ]; do
        PKGLIST="$PKGLIST$CHECKLIST"
@@ -100,12 +96,12 @@
        for pkg in $CHECKLIST ; do
            if [ ! -f $PACKAGES/All/$pkg.tgz ] ; then
                echo " ** $PKGNAME - binary package (dependency) missing"
-               if [ -n "$opt_k" ];then
+               if [ -z "$opt_k" ];then
                    exit 1
                fi
                continue
            fi
-           for dep in `pkg_info -N $PACKAGES/All/$pkg.tgz | ${SED} '1,/Built using:/d' | ${GREP} ..` ; do
+           for dep in $(pkg_info -N $PACKAGES/All/$pkg.tgz | ${SED} '1,/Built using:/d' | ${GREP} ..) ; do
                case "$PKGLIST$NEXTCHECK" in
                    *\ $dep\ *)
                        if [ -n "$opt_v" ];then
@@ -137,8 +133,8 @@
     for var in $* ; do
        MAKEDATA=$MAKEDATA"\t@echo $var=\${$var}\n"
     done
-    eval `printf "$MAKEDATA" | ${MAKE} -f - -f Makefile x | \
-                                       sed -e 's/[^=]*=/&"/' -e 's/$/"/'`
+    eval $(printf "$MAKEDATA" | ${MAKE} -f - -f Makefile x | \
+                                       sed -e 's/[^=]*=/&"/' -e 's/$/"/')
     }
 
 # $1 = name of variable
@@ -146,7 +142,7 @@
 extract_mk_dir_var()
     {
     if [ -z "`eval echo \\$$1`" ] ; then
-       eval `printf "BSD_PKG_MK=1\n.PHONY: x\nx:\n\t@echo $1="'$'"{$1}\n" | ${MAKE} -f - -f $MAKECONF x`
+       eval $(printf "BSD_PKG_MK=1\n.PHONY: x\nx:\n\t@echo $1="'$'"{$1}\n" | ${MAKE} -f - -f $MAKECONF x)
        if [ -z "`eval echo \\$$1`" ]; then
            eval "$1=$2"
        fi
@@ -188,7 +184,7 @@
        fi
     done
     if [ -f ${DISTINFO_FILE} ]; then
-       for f in `${AWK} 'NF == 4 && $3 == "=" { gsub("[()]", "", $2); print $2 }' < ${DISTINFO_FILE}`; do 
+       for f in $(${AWK} 'NF == 4 && $3 == "=" { gsub("[()]", "", $2); print $2 }' < ${DISTINFO_FILE}); do 
            if [ -f ${PATCHDIR}/$f ]; then
                files="$files ${PATCHDIR}/$f";
            fi;
@@ -229,7 +225,7 @@
        echo "$PKGNAME installed in previous stage"
     elif [ -n "$opt_b" -a -f $PACKAGES/All/$PKGNAME.tgz ] ; then
        if [ $INSTALL = Update ];then
-           PKG=`echo $PKGNAME | sed 's/-[0-9].*//'`
+           PKG=$(echo $PKGNAME | sed 's/-[0-9].*//')
            run_cmd "${PKG_DELETE} $PKG" 1
            if [ -n "$FAIL" ]; then
                echo "Can only update packages with dependencies via -s"
@@ -308,7 +304,7 @@
     fi
     }
 
-args=`getopt BC:D:L:U:abcfghiklnrsuv $*`
+args=$(getopt BC:D:L:U:abcfghiklnrsuv $*)
 if [ $? != 0 ]; then
     opt_h=1
 fi
@@ -416,17 +412,17 @@
 fi
 
 cd $PKGSRCDIR
-real_pkgsrcdir=`pwd`
+real_pkgsrcdir=$(pwd)
 
 if [ -n "$opt_i" ];then
-    PKGDIRLIST=`sh -c "${PKG_INFO} -B \*" | ${AWK} -F= '/PKGPATH=/{print $2" "}'`
+    PKGDIRLIST=$(sh -c "${PKG_INFO} -B \*" | ${AWK} -F= '/PKGPATH=/{printf $2" "}')
 fi
 
 if [ -n "$opt_g" ]; then
        if [ -r $PKGCHK_CONF ]; then
                mv $PKGCHK_CONF ${PKGCHK_CONF}.old
        fi
-       echo "# Generated automatically at `date`" > $PKGCHK_CONF
+       echo "# Generated automatically at $(date)" > $PKGCHK_CONF
        ${PKG_INFO} -qBa | ${AWK} '/^PKGPATH/ { sub("PKGPATH=[ ]*", ""); print }' >> $PKGCHK_CONF
 fi
 
@@ -439,7 +435,7 @@
 
     # Determine list of tags
     #
-    TAGS="`hostname | sed -e 's,\..*,,'`,`hostname`,`uname -srm | ${AWK} '{print $1"-"$2"-"$3","$1"-"$2","$1"-"$3","$1","$2","$3}'`"
+    TAGS="$(hostname | sed -e 's,\..*,,'),$(hostname),$(uname -srm | ${AWK} '{print $1"-"$2"-"$3","$1"-"$2","$1"-"$3","$1","$2","$3}')"
     if [ -f /usr/X11R6/lib/libX11.so -o -f /usr/X11R6/lib/libX11.a ];then
        TAGS="$TAGS,x11"
     fi
@@ -463,7 +459,7 @@
 
     # Extract list of valid pkgdirs (skip any 'alreadyset' in $PKGDIRLIST)
     #
-    PKGDIRLIST="$PKGDIRLIST "`${AWK} -v alreadyset="$PKGDIRLIST" -v setlist=$TAGS -v unsetlist=$opt_U '
+    PKGDIRLIST="$PKGDIRLIST "$(${AWK} -v alreadyset="$PKGDIRLIST" -v setlist=$TAGS -v unsetlist=$opt_U '
     BEGIN {
        split(alreadyset, tmp, " ");
        for (tag in tmp) { skip[tmp[tag]] = 1; }
@@ -512,7 +508,7 @@
        { print $1 }
     }
     ' < $PKGCHK_CONF
-    `
+    )
 fi
 
 if [ -n "$opt_l" ] ; then
@@ -537,9 +533,9 @@
     #
     set -- $UPDATE_TODO
     while [ $# != 0 ]; do
-       PKGNAME=`echo $1 | sed 's/-[0-9].*//'`
+       PKGNAME=$(echo $1 | sed 's/-[0-9].*//')
        if [ -f $PKG_DBDIR/$PKGNAME-[0-9]*/+REQUIRED_BY ];then
-           LIST="$LIST$1|$2|`cat $PKG_DBDIR/$PKGNAME-[0-9]*/+REQUIRED_BY | xargs echo`\n"
+           LIST="$LIST$1|$2|$(cat $PKG_DBDIR/$PKGNAME-[0-9]*/+REQUIRED_BY | xargs echo)\n"
        else
            LIST="$LIST$1|$2\n"
        fi
@@ -548,7 +544,7 @@
 
     # drop any packages whose 'parents' are also to be updated
     #
-    UPDATE_TODO=`printf "$LIST" | ${AWK} -F '|' '
+    UPDATE_TODO=$(printf "$LIST" | ${AWK} -F '|' '
     {
     pkg2dir[$1] = $2
     split($3, deplist, " ")
@@ -568,7 +564,7 @@
            print pkg" "pkg2dir[pkg]
        }
     }
-    '`
+    ')
 fi
 
 if [ -n "$opt_f" ] ; then



Home | Main Index | Thread Index | Old Index