if a package subdirectory is listed in the category makefile, but doesn't

exist, then spit out a big warning to stderr (since we often capture stdout
for other purposes) and don't try and descend to that directory.
This commit is contained in:
dmcmahill 2001-07-13 15:14:57 +00:00
parent 4c2989abc9
commit 6b21173ecb
2 changed files with 27 additions and 15 deletions

View file

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: printdepends,v 1.6 2001/02/17 16:45:10 wiz Exp $
# $NetBSD: printdepends,v 1.7 2001/07/13 15:14:57 dmcmahill Exp $
#
# Print list of pkg dependencies suitable for tsort(1).
# Start in /usr/pkgsrc.
@ -19,17 +19,23 @@ cwd=$PWD
for pkgdir in $list
do
cd $pkgdir
l=`make show-depends-dirs`
if [ "$l" = "" ]; then
# No dependencies
echo "$pkgdir $pkgdir"
if [ ! -d $pkgdir ]; then
echo "WARNING: the package directory $pkgdir is listed in" > /dev/stderr
echo $pkgdir | sed 's;/.*;/Makefile;g' > /dev/stderr
echo "but the directory does not exist. Please fix this!" > /dev/stderr
else
for depdir in $l
do
echo "$depdir $pkgdir"
done
cd $pkgdir
l=`make show-depends-dirs`
if [ "$l" = "" ]; then
# No dependencies
echo "$pkgdir $pkgdir"
else
for depdir in $l
do
echo "$depdir $pkgdir"
done
fi
fi
cd $cwd
done

View file

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: printindex,v 1.4 2001/03/31 04:09:58 dmcmahill Exp $
# $NetBSD: printindex,v 1.5 2001/07/13 15:14:57 dmcmahill Exp $
#
#
# Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -56,9 +56,15 @@ list=`grep '^[[:space:]]*'SUBDIR */Makefile | sed 's,/Makefile.*=[[:space:]]*,/,
for pkgdir in $list
do
cd $pkgdir
pkgname=`make show-var VARNAME=PKGNAME`
echo "$pkgdir $pkgname "
if [ ! -d $pkgdir ]; then
echo "WARNING: the package directory $pkgdir is listed in" > /dev/stderr
echo $pkgdir | sed 's;/.*;/Makefile;g' > /dev/stderr
echo "but the directory does not exist. Please fix this!" > /dev/stderr
else
cd $pkgdir
pkgname=`make show-var VARNAME=PKGNAME`
echo "$pkgdir $pkgname "
fi
cd $cwd
done