summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2006-02-18 20:46:42 +0000
committerabs <abs@pkgsrc.org>2006-02-18 20:46:42 +0000
commitd1330c811bee1f64d06634cee71f3e30f3d46475 (patch)
treedfc7dfa81d65ed04d2ff208b2c3c147b34ca9990 /pkgtools
parent63718136de54f7465f285967eb902f1e6d14bf69 (diff)
downloadpkgsrc-d1330c811bee1f64d06634cee71f3e30f3d46475.tar.gz
Update pkg_chk to 1.68
- When listing binary packages with '-l', simplify logic and ensure if a dependency is missing the package which required it is shown. Also list all missing packages rather than stopping after the first - If -n is given with -u do not -
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_chk/Makefile4
-rwxr-xr-xpkgtools/pkg_chk/files/pkg_chk.sh42
2 files changed, 26 insertions, 20 deletions
diff --git a/pkgtools/pkg_chk/Makefile b/pkgtools/pkg_chk/Makefile
index 83cd33fe0bc..f13978b457b 100644
--- a/pkgtools/pkg_chk/Makefile
+++ b/pkgtools/pkg_chk/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.26 2006/02/06 12:44:08 abs Exp $
+# $NetBSD: Makefile,v 1.27 2006/02/18 20:46:42 abs Exp $
-DISTNAME= pkg_chk-1.67
+DISTNAME= pkg_chk-1.68
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkg_chk/files/pkg_chk.sh b/pkgtools/pkg_chk/files/pkg_chk.sh
index 806854c148a..621483d99b9 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.27 2006/02/06 12:44:08 abs Exp $
+# $Id: pkg_chk.sh,v 1.28 2006/02/18 20:46:42 abs Exp $
#
# TODO: Make -g check dependencies and tsort
# TODO: Variation of -g which only lists top level packages
@@ -242,7 +242,10 @@ get_build_ver()
list_packages()
{
- CHECKLIST=' '
+ # DEPCHECKLIST contains packages for which binary packages are known to
+ # exist, but now need to be checked for packages on which they depend
+ DEPCHECKLIST=' '
+ fatal=0
for pkgdir in $* ; do
extract_pkg_vars $pkgdir PKGNAME
if [ -z "$PKGNAME" ]; then
@@ -251,37 +254,33 @@ list_packages()
if is_binary_available $PKGNAME; then
:
else
- fatal_maybe " ** $PKGNAME - binary package missing"
+ msg "*** $PKGNAME - binary package missing"
+ fatal=1
continue
fi
verbose "$PKGNAME.tgz: found"
- CHECKLIST="$CHECKLIST$PKGNAME ";
+ DEPCHECKLIST="$DEPCHECKLIST$PKGNAME ";
done
PAIRLIST=
PKGLIST=' '
- while [ "$CHECKLIST" != ' ' ]; do
+ while [ "$DEPCHECKLIST" != ' ' ]; do
NEXTCHECK=' '
- for pkg in $CHECKLIST ; do
- if is_binary_available $pkg; then
- :
- else
- fatal_maybe " ** $pkg.tgz - binary package dependency missing"
- continue
- fi
+ for pkg in $DEPCHECKLIST ; do
DEPLIST="$(${PKG_INFO} -. -q -N $PACKAGES/$pkg.tgz | ${GREP} .. || true)"
if [ -z "$DEPLIST" ] ; then
PAIRLIST="${PAIRLIST}$pkg.tgz $pkg.tgz\n"
fi
for dep in $DEPLIST ; do
- if is_binary_available $pkg; then
+ if is_binary_available $dep; then
:
else
- fatal_maybe " ** $dep.tgz - dependency missing for $pkg"
+ msg "*** $dep.tgz - dependency missing for $pkg"
+ fatal=1
break 2
fi
PAIRLIST="${PAIRLIST}$dep.tgz $pkg.tgz\n"
- case "$PKGLIST$CHECKLIST$NEXTCHECK" in
+ case "$PKGLIST$DEPCHECKLIST$NEXTCHECK" in
*" $dep "*)
verbose "$pkg: Duplicate depend $dep"
;;
@@ -293,8 +292,11 @@ list_packages()
done
PKGLIST="$pkg $PKGLIST"
done
- CHECKLIST="$NEXTCHECK"
+ DEPCHECKLIST="$NEXTCHECK"
done
+ if [ $fatal = 1 ] ; then
+ fatal_maybe "Some binary packages missing"
+ fi
printf "$PAIRLIST" | ${TSORT}
}
@@ -750,10 +752,14 @@ if [ -n "$delete_and_recheck" ]; then
if [ -f $PKGCHK_UPDATE_CONF ] ; then
msg "Merging in previous $PKGCHK_UPDATE_CONF"
tmp=$(cat $PKGCHK_UPDATE_CONF;echo $(pkgdirs_from_installed)|fmt -1)
- echo $tmp | fmt -1 | ${SORT} -u > $PKGCHK_UPDATE_CONF
+ if [ -z "$opt_n" ] ; then
+ echo $tmp | fmt -1 | ${SORT} -u > $PKGCHK_UPDATE_CONF
+ fi
tmp=
else
- echo $(pkgdirs_from_installed) | fmt -1 > $PKGCHK_UPDATE_CONF
+ if [ -z "$opt_n" ] ; then
+ echo $(pkgdirs_from_installed) | fmt -1 > $PKGCHK_UPDATE_CONF
+ fi
fi
fi
if [ -n "$opt_r" -o -n "$opt_u" ] ; then