diff options
author | dillo <dillo> | 2006-05-04 22:08:05 +0000 |
---|---|---|
committer | dillo <dillo> | 2006-05-04 22:08:05 +0000 |
commit | 42eb438754024cb0a81bf241bce933127f14f24d (patch) | |
tree | 177048fe5e1e55855956f5e7e5f76ff53f37ac11 /pkgtools | |
parent | efde3b330e721d15bb860c81ba99fab45773ebdd (diff) | |
download | pkgsrc-42eb438754024cb0a81bf241bce933127f14f24d.tar.gz |
Bump version to 1.72:
Make it use pkg_summary(5) (with a fallback to the old pkg_chk-summary).
Retire capability to create pkg_chk-summary.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_chk/Makefile | 6 | ||||
-rw-r--r-- | pkgtools/pkg_chk/files/pkg_chk.8 | 8 | ||||
-rwxr-xr-x | pkgtools/pkg_chk/files/pkg_chk.sh | 29 |
3 files changed, 22 insertions, 21 deletions
diff --git a/pkgtools/pkg_chk/Makefile b/pkgtools/pkg_chk/Makefile index 2c72688058c..cb6a9b38018 100644 --- a/pkgtools/pkg_chk/Makefile +++ b/pkgtools/pkg_chk/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.31 2006/05/01 09:34:33 wiz Exp $ +# $NetBSD: Makefile,v 1.32 2006/05/04 22:08:05 dillo Exp $ -DISTNAME= pkg_chk-1.71 +DISTNAME= pkg_chk-1.72 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty @@ -24,9 +24,11 @@ INSTALLATION_DIRS= sbin man/man8 MAKECONF?= /etc/mk.conf +#XXX: how to get GZIP_CMD?! do-build: ${SED} -e 's#@AWK@#${AWK}#g' \ -e 's#@GREP@#${GREP}#g' \ + -e 's#@GZIP_CMD@#gzip#g' \ -e 's#@MAKE@#${MAKE}#g' \ -e 's#@MAKECONF@#${MAKECONF}#g' \ -e 's#@PKG_ADD@#${PKG_ADD}#g' \ diff --git a/pkgtools/pkg_chk/files/pkg_chk.8 b/pkgtools/pkg_chk/files/pkg_chk.8 index 60f4da813c4..5c074a71e6f 100644 --- a/pkgtools/pkg_chk/files/pkg_chk.8 +++ b/pkgtools/pkg_chk/files/pkg_chk.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_chk.8,v 1.18 2006/04/04 20:49:43 wiz Exp $ +.\" $NetBSD: pkg_chk.8,v 1.19 2006/05/04 22:08:05 dillo Exp $ .\" .\" Copyright (c) 2001 by David Brownlee (abs@NetBSD.org) .\" Absolutely no warranty. @@ -10,7 +10,7 @@ .Nd check, and optionally update, installed packages .Sh SYNOPSIS .Nm -.Op Fl aBbcfhiklNnqrSsuv +.Op Fl aBbcfhiklNnqrsuv .Op Fl C Ar conf .Op Fl D Ar tags .Op Fl L Ar file @@ -128,10 +128,6 @@ or Recursively delete any mismatched packages found. Use with care, this does not record which packages were installed for later update. -.It Fl S -Create summary file of binary packages. -If you are using binary packages remotely, this file has to be -created on the server. .It Fl s Building missing packages from source. If DEPENDS_TARGET=package is set in diff --git a/pkgtools/pkg_chk/files/pkg_chk.sh b/pkgtools/pkg_chk/files/pkg_chk.sh index 1f5c263558c..136b93b7671 100755 --- a/pkgtools/pkg_chk/files/pkg_chk.sh +++ b/pkgtools/pkg_chk/files/pkg_chk.sh @@ -1,6 +1,6 @@ #!@SH@ -e # -# $Id: pkg_chk.sh,v 1.32 2006/05/01 09:34:33 wiz Exp $ +# $Id: pkg_chk.sh,v 1.33 2006/05/04 22:08:05 dillo Exp $ # # TODO: Make -g check dependencies and tsort # TODO: Variation of -g which only lists top level packages @@ -8,7 +8,8 @@ PATH=${PATH}:/usr/sbin:/usr/bin -SUMMARY_FILE=pkg_chk-summary +SUMMARY_FILE=pkg_summary.gz +OLD_SUMMARY_FILE=pkg_chk-summary is_binary_available() { @@ -163,9 +164,9 @@ extract_variables() if [ -z "$opt_b" -o -n "$opt_s" -o -d $PKGSRCDIR/pkgtools/pkg_chk ] ; then cd $PKGSRCDIR/pkgtools/pkg_chk - extract_make_vars Makefile AWK GREP SED TSORT SORT PACKAGES PKG_INFO \ - PKG_ADD PKG_DELETE PKGCHK_CONF PKGCHK_UPDATE_CONF \ - PKGCHK_TAGS PKGCHK_NOTAGS + extract_make_vars Makefile AWK GREP GZIP_CMD SED TSORT SORT PACKAGES \ + PKG_INFO PKG_ADD PKG_DELETE PKGCHK_CONF \ + PKGCHK_UPDATE_CONF PKGCHK_TAGS PKGCHK_NOTAGS if [ -z "$PACKAGES" ];then PACKAGES=$PKGSRCDIR/packages fi @@ -563,7 +564,6 @@ usage() -P dir Set PACKAGES dir (overrides any other setting) -q Do not display actions or take any action; only list packages -r Recursively remove mismatches (use with care) (implies -i) - -S Create summary of binary packages -s Install packages by building from source -U tags Comma separated list of pkgchk.conf tags to unset -u Update all mismatched packages (implies -i) @@ -612,7 +612,6 @@ while [ $# != 0 ]; do -P ) opt_P="$2" ; shift ;; -q ) opt_q=1 ; shift ;; -r ) opt_r=1 ;; - -S ) opt_S=1 ;; -s ) opt_s=1 ;; -U ) opt_U="$2" ; shift ;; -u ) opt_u=1 ;; @@ -641,6 +640,8 @@ unset PKG_PATH || true test -n "$AWK" || AWK="@AWK@" test -n "$GREP" || GREP="@GREP@" +test -n "$GZIP_CMD" || GZIP_CMD="@GZIP_CMD@" +export GZIP_CMD test -n "$MAKE" || MAKE="@MAKE@" test -n "$MAKECONF" || MAKECONF="@MAKECONF@" test -n "$PKG_ADD" || PKG_ADD="@PKG_ADD@" @@ -703,10 +704,17 @@ if [ -n "$opt_N" ]; then done fi +AWK_PARSE_SUMMARY='$1=="PKGNAME"{pkgname=$2} $1=="PKGPATH"{pkgpath=$2} NF==0{if (pkgpath && pkgname) print pkgpath ":" pkgname; pkgpath=""; pkgname=""} END{if (pkgpath && pkgname) print pkgpath ":" pkgname}' + if [ \( -n "$opt_b" -o -n "$opt_S" \) -a -z "$opt_s" ] ; then case $PACKAGES in http://*|ftp://*) - PKGDB=`ftp -o - $PACKAGES/$SUMMARY_FILE`;; + PKGDB=`ftp -o - $PACKAGES/$SUMMARY_FILE | ${GZIP_CMD} -cd \ + | ${AWK} -F= "$AWK_PARSE_SUMMARY"` + if [ -z "$PKGDB" ] + then + PKGDB=`ftp -o - $PACKAGES/$OLD_SUMMARY_FILE` + fi;; *) if [ -d "$PACKAGES" ] ; then msg_progress Scan $PACKAGES @@ -721,11 +729,6 @@ if [ \( -n "$opt_b" -o -n "$opt_S" \) -a -z "$opt_s" ] ; then esac fi -if [ -n "$opt_S" ]; then - msg_progress "Write $PACKAGES/$SUMMARY_FILE" - echo "$PKGDB" | tr ' ' '\012' > $PACKAGES/$SUMMARY_FILE -fi - if [ -n "$opt_g" ]; then verbose "Write $PKGCHK_CONF based on installed packages" generate_conf_from_installed $PKGCHK_CONF |