summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_chk
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2005-02-28 00:43:48 +0000
committerwiz <wiz@pkgsrc.org>2005-02-28 00:43:48 +0000
commit14c8b0a57529aff0454c67e2c99e4a85a19d6dbd (patch)
treeec6a2dd84809195f5f20da9df0b92f89831d5057 /pkgtools/pkg_chk
parent48413adff03706d747dd97472636721848436785 (diff)
downloadpkgsrc-14c8b0a57529aff0454c67e2c99e4a85a19d6dbd.tar.gz
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 (limited to 'pkgtools/pkg_chk')
-rw-r--r--pkgtools/pkg_chk/Makefile4
-rw-r--r--pkgtools/pkg_chk/files/pkg_chk.810
-rwxr-xr-xpkgtools/pkg_chk/files/pkg_chk.sh50
3 files changed, 43 insertions, 21 deletions
diff --git a/pkgtools/pkg_chk/Makefile b/pkgtools/pkg_chk/Makefile
index 90dbd8e619e..9bfdf2977b8 100644
--- a/pkgtools/pkg_chk/Makefile
+++ b/pkgtools/pkg_chk/Makefile
@@ -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 --git a/pkgtools/pkg_chk/files/pkg_chk.8 b/pkgtools/pkg_chk/files/pkg_chk.8
index 2add9c9beb5..ef82dbecebc 100644
--- a/pkgtools/pkg_chk/files/pkg_chk.8
+++ b/pkgtools/pkg_chk/files/pkg_chk.8
@@ -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)
.\" 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 @@ Will abort if a binary package is missing.
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 --git a/pkgtools/pkg_chk/files/pkg_chk.sh b/pkgtools/pkg_chk/files/pkg_chk.sh
index 9f2d9c00bde..5de738124ca 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.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 @@ usage()
echo
fi
echo 'Usage: pkg_chk [opts]
- -B Check the "Build version" of packages (implies -i)
- -P dir Set PACKAGES dir (overrides any other setting)
- -C conf Use pkgchk.conf file '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 Check the "Build version" of packages (implies -i)
-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
-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 @@ verbose()
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
- -B ) opt_B=1 ; opt_i=1 ;;
- -C ) opt_C="$2" ; shift;;
- -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 ; opt_i=1 ;;
-b ) opt_b=1 ;;
+ -C ) opt_C="$2" ; shift;;
-c ) opt_c=1 ;;
+ -D ) opt_D="$2" ; shift;;
-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 @@ if [ -z "$opt_b" -a -z "$opt_s" ];then
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 @@ if [ -d $PACKAGES/All ] ; then
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