summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
authorwiz <wiz>2006-07-26 17:00:03 +0000
committerwiz <wiz>2006-07-26 17:00:03 +0000
commit1c137fdfc646910b1ea09a701ace56380f0bda01 (patch)
treefc6641c0ee846381e412107036e2c03c5324eccd /mk/bulk
parent8f5a531683690917d3983b4192a8013d24c045d4 (diff)
downloadpkgsrc-1c137fdfc646910b1ea09a701ace56380f0bda01.tar.gz
When the bulk build code encounters a directory in *SPECIFIC_PKGS
that does not exist, it stopped. Now it instead adds an entry to the main broken file and marks it as not package with maintainer "directory_does_not_exist" in the HTML output. (Not packaged directories are not mentioned in the text version.)
Diffstat (limited to 'mk/bulk')
-rw-r--r--mk/bulk/bsd.bulk-pkg.mk9
-rw-r--r--mk/bulk/post-build23
2 files changed, 27 insertions, 5 deletions
diff --git a/mk/bulk/bsd.bulk-pkg.mk b/mk/bulk/bsd.bulk-pkg.mk
index 4eb606c4ac2..f046bd01b67 100644
--- a/mk/bulk/bsd.bulk-pkg.mk
+++ b/mk/bulk/bsd.bulk-pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.bulk-pkg.mk,v 1.120 2006/07/03 00:00:56 rillig Exp $
+# $NetBSD: bsd.bulk-pkg.mk,v 1.121 2006/07/26 17:00:03 wiz Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@@ -248,7 +248,12 @@ bulk-cache:
@${BULK_MSG} "Extracting database for SPECIFIC_PKGS subset of pkgsrc"
@${BULK_MSG_CONT} "along with their dependencies"
. for __tmp__ in ${SUBDIR} ${BULK_PREREQ} lang/perl5 pkgtools/pkglint
- cd ${PKGSRCDIR}/${__tmp__} && ${SETENV} BMAKE=${MAKE:Q} AWK=${AWK:Q} EXPR=${EXPR:Q} ${SH} ../../mk/scripts/mkdatabase -a -f ${BULK_DBFILE:Q}
+ @if [ ! -d ${PKGSRCDIR}/${__tmp__} ]; then \
+ ${BULK_MSG} "WARN: Skipping nonexisting directory ${__tmp__}"; \
+ ${ECHO} " 0 ${__tmp__} 0" >> ${BULKFILESDIR:Q}/${BROKENFILE:Q}; \
+ else \
+ cd ${PKGSRCDIR}/${__tmp__} && ${SETENV} BMAKE=${MAKE:Q} AWK=${AWK:Q} EXPR=${EXPR:Q} ${SH} ../../mk/scripts/mkdatabase -a -f ${BULK_DBFILE:Q}; \
+ fi
. endfor
@${BULK_MSG} "Extracting dependency tree file"
${AWK} '/^(build_)?depends/ {pkgs[$$2] = 1; cat=$$2; sub(/\/.*/, "", cat); \
diff --git a/mk/bulk/post-build b/mk/bulk/post-build
index e6610f2da01..67e12a0b382 100644
--- a/mk/bulk/post-build
+++ b/mk/bulk/post-build
@@ -1,5 +1,5 @@
#!/usr/pkg/bin/perl
-# $NetBSD: post-build,v 1.63 2006/01/21 11:29:32 rillig Exp $
+# $NetBSD: post-build,v 1.64 2006/07/26 17:00:03 wiz Exp $
#
# Collect stuff after a pkg bulk build
#
@@ -322,8 +322,20 @@ sub pkgResult ($$) {
my $pkg = $pinfo->{pkg};
my $nbrokenby = $pinfo->{nbrokenby};
my $nerrors = $pinfo->{nerrors};
+ my $pkgdirmissing = 0;
+ my $DIR;
- my @idents = `$vars{FIND} $vars{USR_PKGSRC}/$pkg -type f -print | xargs grep \\\$NetBSD`;
+ if (not opendir($DIR, "$vars{USR_PKGSRC}/$pkg")) {
+ $pkgdirmissing=1;
+ }
+ else {
+ closedir($DIR);
+ }
+
+ my @idents = "";
+ if (not $pkgdirmissing) {
+ @idents = `$vars{FIND} $vars{USR_PKGSRC}/$pkg -type f -print | xargs grep \\\$NetBSD`;
+ }
my $datetime = "";
my $file = "";
my $ver = "";
@@ -336,7 +348,12 @@ sub pkgResult ($$) {
}
}
- my $maintainer = `grep ^MAINTAINER $vars{USR_PKGSRC}/$pkg/Makefile`;
+ my $maintainer;
+ if (not $pkgdirmissing) {
+ $maintainer = `grep ^MAINTAINER $vars{USR_PKGSRC}/$pkg/Makefile`;
+ } else {
+ $maintainer = "directory_does_not_exist";
+ }
$maintainer =~ s/MAINTAINER=[ \t]*//;
if (! $maintainer) {
$maintainer = `cd $vars{USR_PKGSRC}/$pkg ; $BMAKE show-var VARNAME=MAINTAINER`;