pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Update pkgchk to 1.44 - add a -g option to generate an...
details: https://anonhg.NetBSD.org/pkgsrc/rev/62217fcb3de2
branches: trunk
changeset: 462517:62217fcb3de2
user: agc <agc%pkgsrc.org@localhost>
date: Sat Oct 04 21:07:53 2003 +0000
description:
Update pkgchk to 1.44 - add a -g option to generate an initial pkgchk.conf
file based upon the packages currently installed on the host machine.
diffstat:
doc/CHANGES | 3 ++-
pkgtools/pkgchk/Makefile | 4 ++--
pkgtools/pkgchk/files/pkgchk.8 | 6 +++++-
pkgtools/pkgchk/files/pkgchk.sh | 17 +++++++++++++----
4 files changed, 22 insertions(+), 8 deletions(-)
diffs (107 lines):
diff -r 48412b46e181 -r 62217fcb3de2 doc/CHANGES
--- a/doc/CHANGES Sat Oct 04 21:02:02 2003 +0000
+++ b/doc/CHANGES Sat Oct 04 21:07:53 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.3636 2003/10/04 21:02:02 jschauma Exp $
+$NetBSD: CHANGES,v 1.3637 2003/10/04 21:08:46 agc Exp $
Changes to the packages collection and infrastructure in 2003:
@@ -4071,3 +4071,4 @@
Added scm-5d8 [agc 2003-10-04]
Added gpspoint-2.030521 [jschauma 2003-10-04]
Added gpsutils-0.4.0 [jschauma 2003-10-04]
+ Updated pkgchk to 1.44 [agc 2003-10-04]
diff -r 48412b46e181 -r 62217fcb3de2 pkgtools/pkgchk/Makefile
--- a/pkgtools/pkgchk/Makefile Sat Oct 04 21:02:02 2003 +0000
+++ b/pkgtools/pkgchk/Makefile Sat Oct 04 21:07:53 2003 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.47 2003/10/01 11:30:10 abs Exp $
+# $NetBSD: Makefile,v 1.48 2003/10/04 21:07:53 agc Exp $
-DISTNAME= pkgchk-1.43
+DISTNAME= pkgchk-1.44
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools
MASTER_SITES= # empty
diff -r 48412b46e181 -r 62217fcb3de2 pkgtools/pkgchk/files/pkgchk.8
--- a/pkgtools/pkgchk/files/pkgchk.8 Sat Oct 04 21:02:02 2003 +0000
+++ b/pkgtools/pkgchk/files/pkgchk.8 Sat Oct 04 21:07:53 2003 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkgchk.8,v 1.18 2003/10/04 12:02:12 seb Exp $
+.\" $NetBSD: pkgchk.8,v 1.19 2003/10/04 21:07:53 agc Exp $
.\"
.\" Copyright (c) 2001 by David Brownlee (abs%netbsd.org@localhost)
.\" Absolutely no warranty.
@@ -71,6 +71,10 @@
or
.Fl i
to just fetch missing/mismatches packages.
+.It Fl g
+Generate an initial
+.Pa pkgchk.conf
+file based upon the packages installed on the host machine.
.It Fl h
Brief help.
.It Fl i
diff -r 48412b46e181 -r 62217fcb3de2 pkgtools/pkgchk/files/pkgchk.sh
--- a/pkgtools/pkgchk/files/pkgchk.sh Sat Oct 04 21:02:02 2003 +0000
+++ b/pkgtools/pkgchk/files/pkgchk.sh Sat Oct 04 21:07:53 2003 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -e
#
-# $Id: pkgchk.sh,v 1.46 2003/10/01 11:30:10 abs Exp $
+# $Id: pkgchk.sh,v 1.47 2003/10/04 21:07:53 agc Exp $
#
# TODO: Handle updates with dependencies via binary packages
@@ -308,7 +308,7 @@
fi
}
-args=`getopt BC:D:L:U:abcfhiklnrsuv $*`
+args=`getopt BC:D:L:U:abcfghiklnrsuv $*`
if [ $? != 0 ]; then
opt_h=1
fi
@@ -324,6 +324,7 @@
-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 ;;
@@ -342,8 +343,8 @@
opt_b=1; opt_s=1;
fi
-if [ -z "$opt_a" -a -z "$opt_c" -a -z "$opt_i" -a -z "$opt_l" ];then
- echo "Must specify at least one of -a, -c, -i, -l, or -u";
+if [ -z "$opt_a" -a -z "$opt_c" -a -z "$opt_g" -a -z "$opt_i" -a -z "$opt_l" ];then
+ echo "Must specify at least one of -a, -c, -g, -i, -l, or -u";
echo
opt_h=1;
fi
@@ -359,6 +360,7 @@
-b Limit installations to 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
@@ -420,6 +422,13 @@
PKGDIRLIST=`sh -c "${PKG_INFO} -B \*" | ${AWK} -F= '/PKGPATH=/{print $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
+ ${PKG_INFO} -qBa | awk '/^PKGPATH/ { sub("PKGPATH=[ ]*", ""); print }' >> $PKGCHK_CONF
+fi
if [ -n "$opt_c" -o -n "$opt_l" ];then
Home |
Main Index |
Thread Index |
Old Index