pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkgchk Update pkgchk to 1.41:
details: https://anonhg.NetBSD.org/pkgsrc/rev/bfb8ebfd2877
branches: trunk
changeset: 461445:bfb8ebfd2877
user: abs <abs%pkgsrc.org@localhost>
date: Tue Sep 16 14:36:08 2003 +0000
description:
Update pkgchk to 1.41:
Implement '-L logfile' which redirect the output of any commands run
into the logfile, displaying the tail end on any errors.
diffstat:
pkgtools/pkgchk/Makefile | 4 ++--
pkgtools/pkgchk/files/pkgchk.8 | 7 ++++++-
pkgtools/pkgchk/files/pkgchk.sh | 20 +++++++++++++++++---
3 files changed, 25 insertions(+), 6 deletions(-)
diffs (106 lines):
diff -r 73bb1a79f1c3 -r bfb8ebfd2877 pkgtools/pkgchk/Makefile
--- a/pkgtools/pkgchk/Makefile Tue Sep 16 14:33:01 2003 +0000
+++ b/pkgtools/pkgchk/Makefile Tue Sep 16 14:36:08 2003 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.44 2003/09/10 19:12:52 jmmv Exp $
+# $NetBSD: Makefile,v 1.45 2003/09/16 14:36:08 abs Exp $
-DISTNAME= pkgchk-1.40
+DISTNAME= pkgchk-1.41
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools
MASTER_SITES= # empty
diff -r 73bb1a79f1c3 -r bfb8ebfd2877 pkgtools/pkgchk/files/pkgchk.8
--- a/pkgtools/pkgchk/files/pkgchk.8 Tue Sep 16 14:33:01 2003 +0000
+++ b/pkgtools/pkgchk/files/pkgchk.8 Tue Sep 16 14:36:08 2003 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkgchk.8,v 1.14 2003/09/10 19:04:53 jmmv Exp $
+.\" $NetBSD: pkgchk.8,v 1.15 2003/09/16 14:36:10 abs Exp $
.\"
.\" Copyright (c) 2001 by David Brownlee (abs%netbsd.org@localhost)
.\" Absolutely no warranty.
@@ -37,6 +37,11 @@
Add the comma separated list of tags to those checked when parsing
pkgchk.conf. Also includes
.Ev PKGCHK_TAGS .
+.It Fl L Ar file
+Redirect the output for all commands run into the logfile
+.Pa file .
+Should be specified as a full pathname. On any error the tail end of the
+logfile will be displayed.
.It Fl U Ar tags
Remove the comma separated list of tags from those checked when
parsing pkgchk.conf. Also includes
diff -r 73bb1a79f1c3 -r bfb8ebfd2877 pkgtools/pkgchk/files/pkgchk.sh
--- a/pkgtools/pkgchk/files/pkgchk.sh Tue Sep 16 14:33:01 2003 +0000
+++ b/pkgtools/pkgchk/files/pkgchk.sh Tue Sep 16 14:36:08 2003 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -e
#
-# $Id: pkgchk.sh,v 1.43 2003/09/10 19:12:55 jmmv Exp $
+# $Id: pkgchk.sh,v 1.44 2003/09/16 14:36:12 abs Exp $
#
# TODO: Handle updates with dependencies via binary packages
@@ -227,9 +227,16 @@
fi
echo $1
if [ -z "$opt_n" ];then
- sh -c "$1" || FAIL=1
+ if [ -n "$opt_L" ] ; then
+ sh -c "$1" > "$opt_L" 2>&1 || FAIL=1
+ else
+ sh -c "$1" || FAIL=1
+ fi
if [ -n "$FAIL" ] ; then
echo "** '$1' failed"
+ if [ -n "$opt_L" ] ; then
+ tail -20 "$opt_L"
+ fi
if [ "$FAILOK" != 1 ]; then
exit 1
fi
@@ -237,7 +244,7 @@
fi
}
-args=`getopt BC:D:U:abcfhiknrsuv $*`
+args=`getopt BC:D:L:U:abcfhiknrsuv $*`
if [ $? != 0 ]; then
opt_h=1
fi
@@ -247,6 +254,7 @@
-B ) opt_B=1 ; opt_i=1 ;;
-C ) opt_C="$2" ; shift;;
-D ) opt_D="$2" ; shift;;
+ -L ) opt_L="$2" ; shift;;
-U ) opt_U="$2" ; shift;;
-a ) opt_a=1 ; opt_c=1 ;;
-b ) opt_b=1 ;;
@@ -280,6 +288,7 @@
-B Check the "Build version" of packages (implies -i)
-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 Limit installations to binary packages
@@ -329,6 +338,10 @@
ac_n= ac_c='\c' ac_t=
fi
+if [ -n "$opt_L" ] ; then
+ rm -f $opt_L
+fi
+
extract_variables
if [ -n "$opt_C" ] ; then
PKGCHK_CONF=$opt_C
@@ -341,6 +354,7 @@
PKGDIRLIST=`sh -c "${PKG_INFO} -B \*" | ${AWK} -F= '/PKGPATH=/{print $2" "}'`
fi
+
if [ -n "$opt_c" ];then
if [ ! -r $PKGCHK_CONF ];then
Home |
Main Index |
Thread Index |
Old Index