diff options
-rw-r--r-- | mk/bulk/printindex | 22 | ||||
-rw-r--r-- | mk/bulk/printindex.1 | 5 |
2 files changed, 24 insertions, 3 deletions
diff --git a/mk/bulk/printindex b/mk/bulk/printindex index f5cbb9f4076..82ad5058452 100644 --- a/mk/bulk/printindex +++ b/mk/bulk/printindex @@ -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 diff --git a/mk/bulk/printindex.1 b/mk/bulk/printindex.1 index a6da64b3c31..c8b79178362 100644 --- a/mk/bulk/printindex.1 +++ b/mk/bulk/printindex.1 @@ -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 ) |