pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_chk Update to 1.56:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e01a73d584cf
branches:  trunk
changeset: 489892:e01a73d584cf
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Feb 28 00:43:48 2005 +0000

description:
Update to 1.56:
Add new -N option, showing for each installed package any corresponding
entries in pkgsrc/doc/TODO (to give you an idea what updates you could
be interested in :) ).
While here, sort options in usage.
Ok'd by abs@.

diffstat:

 pkgtools/pkg_chk/Makefile         |   4 +-
 pkgtools/pkg_chk/files/pkg_chk.8  |  10 +++++--
 pkgtools/pkg_chk/files/pkg_chk.sh |  50 ++++++++++++++++++++++++++------------
 3 files changed, 43 insertions(+), 21 deletions(-)

diffs (164 lines):

diff -r 35c25c72e133 -r e01a73d584cf pkgtools/pkg_chk/Makefile
--- a/pkgtools/pkg_chk/Makefile Sun Feb 27 23:53:31 2005 +0000
+++ b/pkgtools/pkg_chk/Makefile Mon Feb 28 00:43:48 2005 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2005/02/09 09:50:26 abs Exp $
+# $NetBSD: Makefile,v 1.13 2005/02/28 00:43:48 wiz Exp $
 
-DISTNAME=      pkg_chk-1.55
+DISTNAME=      pkg_chk-1.56
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r 35c25c72e133 -r e01a73d584cf pkgtools/pkg_chk/files/pkg_chk.8
--- a/pkgtools/pkg_chk/files/pkg_chk.8  Sun Feb 27 23:53:31 2005 +0000
+++ b/pkgtools/pkg_chk/files/pkg_chk.8  Mon Feb 28 00:43:48 2005 +0000
@@ -1,16 +1,16 @@
-.\"    $NetBSD: pkg_chk.8,v 1.7 2005/02/05 00:26:41 simonb Exp $
+.\"    $NetBSD: pkg_chk.8,v 1.8 2005/02/28 00:43:48 wiz Exp $
 .\"
 .\" Copyright (c) 2001 by David Brownlee (abs%NetBSD.org@localhost)
 .\" Absolutely no warranty.
 .\"
-.Dd November 30, 2004
+.Dd February 28, 2005
 .Dt PKG_CHK 1
 .Sh NAME
 .Nm pkg_chk
 .Nd check, and optionally update, installed packages
 .Sh SYNOPSIS
 .Nm
-.Op Fl aBbcfhiklnrsuv
+.Op Fl aBbcfhiklNnrsuv
 .Op Fl C Ar conf
 .Op Fl D Ar tags
 .Op Fl L Ar file
@@ -95,6 +95,10 @@
 This can be used (in conjunction with -U and -D) to determine what
 packages would need to be copied to a remote machine to ensure it
 was completely up to date.
+.It Fl N
+For each installed package, look if there is a newer version
+noted in PKGSRCDIR/doc/TODO.
+Good for finding packages to update.
 .It Fl n
 Display actions that would be taken, but do not change anything.
 .It Fl r
diff -r 35c25c72e133 -r e01a73d584cf pkgtools/pkg_chk/files/pkg_chk.sh
--- a/pkgtools/pkg_chk/files/pkg_chk.sh Sun Feb 27 23:53:31 2005 +0000
+++ b/pkgtools/pkg_chk/files/pkg_chk.sh Mon Feb 28 00:43:48 2005 +0000
@@ -1,6 +1,6 @@
 #!@SH@ -e
 #
-# $Id: pkg_chk.sh,v 1.12 2005/02/09 09:50:26 abs Exp $
+# $Id: pkg_chk.sh,v 1.13 2005/02/28 00:43:48 wiz Exp $
 #
 # TODO: Handle updates with dependencies via binary packages
 
@@ -361,24 +361,25 @@
        echo
     fi
     echo 'Usage: pkg_chk [opts]
+       -a      Add all missing packages (implies -c)
        -B      Check the "Build version" of packages (implies -i)
-       -P dir  Set PACKAGES dir (overrides any other setting)
+       -b      Install binary packages
        -C conf Use pkgchk.conf file 'conf'
+       -c      Check installed packages against pkgchk.conf
        -D tags Comma separated list of additional pkgchk.conf tags to set
-       -L file Redirect output from commands run into file (should be fullpath)
-       -U tags Comma separated list of pkgchk.conf tags to unset
-       -a      Add all missing packages (implies -c)
-       -b      Install binary packages
-       -c      Check installed packages against pkgchk.conf
        -f      Perform a 'make fetch' for all required packages
        -g      Generate an initial pkgchk.conf file
        -h      This help
        -i      Check versions of installed packages (not using pkgchk.conf)
        -k      Continue with further packages if errors are encountered
+       -L file Redirect output from commands run into file (should be fullpath)
        -l      List binary packages including dependencies (implies -c)
+       -N      List installed packages for which a newer version is in TODO
        -n      Display actions that would be taken, but do not perform them
+       -P dir  Set PACKAGES dir (overrides any other setting)
        -r      Recursively remove mismatches (use with care) (implies -i)
        -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)
        -v      Verbose
 
@@ -399,31 +400,32 @@
     fi
     }
 
-args=$(getopt BC:D:L:P:U:abcfghiklnrsuv $*)
+args=$(getopt BC:D:L:P:U:abcfghiklNnrsuv $*)
 if [ $? != 0 ]; then
     opt_h=1
 fi
 set -- $args
 while [ $# != 0 ]; do
     case "$1" in
+       -a )    opt_a=1 ; opt_c=1 ;;
        -B )    opt_B=1 ; opt_i=1 ;;
+       -b )    opt_b=1 ;;
        -C )    opt_C="$2" ; shift;;
+       -c )    opt_c=1 ;;
        -D )    opt_D="$2" ; shift;;
-       -L )    opt_L="$2" ; shift;;
-       -P )    opt_P="$2" ; shift;;
-       -U )    opt_U="$2" ; shift;;
-       -a )    opt_a=1 ; opt_c=1 ;;
-       -b )    opt_b=1 ;;
-       -c )    opt_c=1 ;;
        -f )    opt_f=1 ;;
        -g )    opt_g=1 ;;
        -h )    opt_h=1 ;;
        -i )    opt_i=1 ;;
        -k )    opt_k=1 ;;
+       -L )    opt_L="$2" ; shift;;
        -l )    opt_l=1 ;;
+       -N )    opt_N=1 ;;
        -n )    opt_n=1 ;;
+       -P )    opt_P="$2" ; shift;;
        -r )    opt_r=1 ; opt_i=1 ;;
        -s )    opt_s=1 ;;
+       -U )    opt_U="$2" ; shift;;
        -u )    opt_u=1 ; opt_i=1 ;;
        -v )    opt_v=1 ;;
        -- )    shift; break ;;
@@ -435,9 +437,9 @@
     opt_b=1; opt_s=1;
 fi
 
-if [ -z "$opt_a" -a -z "$opt_c" -a -z "$opt_g" -a -z "$opt_i" -a -z "$opt_l" ];
+if [ -z "$opt_a" -a -z "$opt_c" -a -z "$opt_g" -a -z "$opt_i" -a -z "$opt_N" -a -z "$opt_l" ];
 then
-    usage "Must specify at least one of -a, -c, -g, -i, -l, or -u";
+    usage "Must specify at least one of -a, -c, -g, -i, -l, -N, or -u";
 fi
 
 if [ -n "$opt_h" -o $# != 0 ];then
@@ -491,6 +493,22 @@
     PACKAGES="$PACKAGES/All"
 fi
 
+if [ -n "$opt_N" ]; then
+       ${PKG_INFO} | \
+               ${SED} -e "s/[  ].*//" -e "s/-[^-]*$//" \
+                      -e "s/py[0-9][0-9]pth-/py-/" \
+                      -e "s/py[0-9][0-9]-/py-/" | \
+               while read a
+               do
+                       b=$(grep "o $a-[0-9]" $PKGSRCDIR/doc/TODO | \
+                               sed -e "s/[     ]*o //")
+               if [ "$b" ]
+               then
+                       echo $a: $b
+               fi
+       done
+fi
+
 if [ -n "$opt_b" -a -z "$opt_s" -a -d $PACKAGES ] ; then
     msg_progress Scan $PACKAGES
     cd $PACKAGES



Home | Main Index | Thread Index | Old Index