diff options
author | abs <abs@pkgsrc.org> | 2001-09-16 22:27:59 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2001-09-16 22:27:59 +0000 |
commit | ef55564253121a65de172ba0636460105a8c4112 (patch) | |
tree | 735c3ca6169d1af7e25ccc3db84afedf947a8b7e /pkgtools | |
parent | 1799dadcefada84d9707d8b45e59c00dbd148206 (diff) | |
download | pkgsrc-ef55564253121a65de172ba0636460105a8c4112.tar.gz |
Update pkgchk to 1.12
Report failed installs when running with -k
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkgchk/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pkgchk/files/pkgchk.sh | 19 |
2 files changed, 16 insertions, 7 deletions
diff --git a/pkgtools/pkgchk/Makefile b/pkgtools/pkgchk/Makefile index 93b254e48be..fef0d3d6a4e 100644 --- a/pkgtools/pkgchk/Makefile +++ b/pkgtools/pkgchk/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.12 2001/09/13 17:44:27 abs Exp $ +# $NetBSD: Makefile,v 1.13 2001/09/16 22:27:59 abs Exp $ -DISTNAME= pkgchk-1.11 +DISTNAME= pkgchk-1.12 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkgchk/files/pkgchk.sh b/pkgtools/pkgchk/files/pkgchk.sh index d69ed6c7a11..180663d872a 100755 --- a/pkgtools/pkgchk/files/pkgchk.sh +++ b/pkgtools/pkgchk/files/pkgchk.sh @@ -1,6 +1,6 @@ #!/bin/sh -e # -# $Id: pkgchk.sh,v 1.13 2001/09/13 17:44:27 abs Exp $ +# $Id: pkgchk.sh,v 1.14 2001/09/16 22:27:59 abs Exp $ # # TODO: Handle and as well as or tags (eg: i386+x11) # TODO: Handle updates with dependencies via binary packages @@ -52,6 +52,7 @@ pkg_install() PKGDIR=$2 INSTALL=$3 + FAIL= if [ -d /var/db/pkg/$PKGNAME ];then echo "$PKGNAME installed in previous stage" elif [ -n "$opt_b" -a -f $PACKAGES/All/$PKGNAME.tgz ] ; then @@ -70,7 +71,7 @@ pkg_install() echo "pkg_add $PKGNAME.tgz" if [ -z "$opt_n" ];then if [ -n "$opt_k" ]; then - pkg_add $PACKAGES/All/$PKGNAME.tgz || true + pkg_add $PACKAGES/All/$PKGNAME.tgz || FAIL=1 else pkg_add $PACKAGES/All/$PKGNAME.tgz fi @@ -80,12 +81,19 @@ pkg_install() cd $PKGSRCDIR/$PKGDIR if [ -z "$opt_n" ];then if [ -n "$opt_k" ]; then - ${MAKE} update || true + ${MAKE} update || FAIL=1 else ${MAKE} update fi fi fi + if [ -n "$FAIL" -o ! -d /var/db/pkg/$PKGNAME ];then + FAIL_DONE=$FAIL_DONE" "$PKGNAME + elif [ $INSTALL = U ];then + UPDATE_DONE=$UPDATE_DONE" "$PKGNAME + else + INSTALL_DONE=$INSTALL_DONE" "$PKGNAME + fi } @@ -364,7 +372,6 @@ if [ -n "$UPDATE_TODO" ];then set -- $UPDATE_TODO while [ $# != 0 ]; do pkg_install $1 $2 U - UPDATE_DONE=$UPDATE_DONE" "$1 shift ; shift; done fi @@ -374,7 +381,6 @@ if [ -n "$INSTALL_TODO" ];then set -- $INSTALL_TODO while [ $# != 0 ]; do pkg_install $1 $2 I - INSTALL_DONE=$INSTALL_DONE" "$1 shift ; shift; done fi @@ -385,3 +391,6 @@ fi if [ -n "$INSTALL_DONE" ];then echo "Installed:$INSTALL_DONE" fi +if [ -n "$FAIL_DONE" ];then + echo "Failed:$FAIL_DONE" +fi |