update to version 0.26.0

Major changes:

    pkg_src_summary analyses DEPENDS and BUILD_DEPENDS for correctness.
    That is if appropriate directories don't exist, building summary
    fails with stderr messages.

    'pkg_micro_src_summary -f' supports comma separated fields

    pkg_cmp_summary: new option -P for comparison PKGPATH without PKGNAME
This commit is contained in:
Aleksey Cheusov 2009-03-05 22:45:28 +00:00 committed by Thomas Klausner
parent 220ef7cf70
commit 8a41f40c66
4 changed files with 45 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.25 2008/12/26 17:10:23 cheusov Exp $
# $NetBSD: Makefile,v 1.26 2009/03/05 22:45:28 cheusov Exp $
DISTNAME= pkg_summary-utils-${VERSION}beta1
DISTNAME= pkg_summary-utils-${VERSION}
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -1 +1 @@
VERSION= 0.25.0
VERSION= 0.26.0

View file

@ -1,3 +1,14 @@
----------------------------------------------------------------------
Version 0.26.0, by Aleksey Cheusov, Fri, 6 Mar 2009 00:29:03 +0200
pkg_src_summary analyses DEPENDS and BUILD_DEPENDS for correctness.
That is if appropriate directories don't exist, building summary
fails with stderr messages.
'pkg_micro_src_summary -f' supports comma separated fields
pkg_cmp_summary: new option -P for comparison PKGPATH without PKGNAME
----------------------------------------------------------------------
Version 0.24.0, by Aleksey Cheusov, Fri, 26 Dec 2008 15:30:19 +0200

View file

@ -38,6 +38,9 @@ if test -z "$BMAKE"; then
BMAKE=make
fi
if test -z "$PSS_MKSCRIPTSDIR"; then
PSS_MKSCRIPTSDIR=@@mkscriptsdir@@
fi
############################################################
usage (){
cat 1>&2 <<EOF
@ -258,7 +261,7 @@ cd_and_print_summary (){
# INHER_ASSIGNS must be before DEPENDS and BUILD_DEPENDS, see below
( cd "$real_pkgpath" && eval ${BMAKE} -f ./Makefile $extra_mk \
-f @@mkscriptsdir@@/pkg_src_summary.mk my-show-vars \
-f "$PSS_MKSCRIPTSDIR"/pkg_src_summary.mk my-show-vars \
VARNAMES="'_INHER_ASSIGNS _INHER_ASSIGNS_REJ ASSIGNMENTS $varnames'" \
$var_assignments $var_assigns ) > "$tmpfn" || return 1
@ -290,14 +293,38 @@ cd_and_print_summary (){
fi
}
summary2deps (){
awk '
match($0, /^(BUILD_)?DEPENDS=/) {
$0=substr($0, RLENGTH+1)
gsub(/[^ :]*:[.][.]\/[.][.]\//, "")
print
}' "$@"
}
generate_summary (){
# general information
if cd_and_print_summary $1 2>"$errsfn"
then
cat "$summaryfn"
# cat "$errsfn" 1>&2
all_deps=$(summary2deps "$summaryfn")
echo '' # empty line - separator
bad_deps=''
for d in $all_deps; do
if ! test -d "$PKGSRCDIR/$d"; then
if test -z "$bad_deps"; then
printf ' ------------------\n' 1>&2
printf "Bad package %s, skipped\n" "$1" 1>&2
fi
bad_deps=1
printf " not existing dependancy: %s\n" "$d" 1>&2
fi
done
if test -z "$bad_deps"; then
cat "$summaryfn"
echo '' # empty line - separator
fi
else
printf ' ------------------\n' 1>&2
printf "Bad package %s, skipped\n" "$1" 1>&2