The bulk builds now use the new target can-be-built-here, which checks

if some of PKG_SKIP_REASON, PKG_FAIL_REASON, NOT_FOR_*, ONLY_FOR_* are
set.

The code uses some shell trickery to avoid the use of subshells, since
these would prevent the variable assignments from being effective.
This commit is contained in:
rillig 2006-11-26 08:39:52 +00:00
parent 714dc5ff6b
commit b4ca67c5db
2 changed files with 24 additions and 3 deletions

View file

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: printindex,v 1.28 2005/11/28 01:14:35 rillig Exp $
# $NetBSD: printindex,v 1.29 2006/11/26 08:39:52 rillig Exp $
#
# Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -134,6 +134,9 @@ case $list in
exit 1
esac
newline="
"
#
# Print the table of PKGPATH and PKGNAME.
#
@ -158,9 +161,24 @@ for pkgdir in $list :detect_duplicates: $BULK_PREREQ; do
esac
if cd "${pkgsrcdir}/${pkgdir}"; then
if pkgname=`${BMAKE} show-var VARNAME=PKGNAME`; then
if output=`${BMAKE} show-var VARNAME=PKGNAME can-be-built-here`; then
reasons=""
{
read pkgname
read can_be_built_here
while read reason; do
reasons="$reasons$reason$newline"
done
} <<EOF
$output
EOF
echo "${pkgdir} ${pkgname}"
done_pkgs="${done_pkgs} =${pkgdir}="
if [ "$can_be_built_here" != "yes" ]; then
${mkbulkdir} "${bulkfilesdir}/${pkgdir}"
echo "$reasons" > "${bulkfilesdir}/${pkgdir}/${brokenfile}"
fi
else
echo "$0: error: could not extract PKGNAME for ${pkgdir} -- skipping." 1>&2

View file

@ -1,4 +1,4 @@
.\" $NetBSD: printindex.1,v 1.6 2006/01/19 10:21:12 rillig Exp $
.\" $NetBSD: printindex.1,v 1.7 2006/11/26 08:39:52 rillig Exp $
.\"
.\" Copyright (c) 2005 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -46,6 +46,9 @@
.Sh DESCRIPTION
Generates a mapping from pkgsrc directories to the current package
version and prints it on stdout.
It also checks whether the package can be built on this system at all
and marks those that cannot be built as broken.
.Pp
Each line of the output has two fields:
the package directory (in the form
.Ql category/package )