summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill@pkgsrc.org>2001-02-08 19:17:38 +0000
committerdmcmahill <dmcmahill@pkgsrc.org>2001-02-08 19:17:38 +0000
commit82f326d1da1982c4de4c26b845a4040d9d20c1d8 (patch)
tree602c0513f849b44f1625f7fa0d54610348e48c64 /mk
parent73f8735fa40647a03a5489d45c7d30021dca9e01 (diff)
downloadpkgsrc-82f326d1da1982c4de4c26b845a4040d9d20c1d8.tar.gz
when a package fails to package, keep a count of how many others packages
fail as a result. Then report this number in the generated email and html summary. The goal is to help the pkgsrc crew focus our efforts on the broken packages which have the largest impact. Thanks to Christoph Badura for suggesting that I do this and Hubert Feyrer who suggested an easier to read output format.
Diffstat (limited to 'mk')
-rw-r--r--mk/bulk/bsd.bulk-pkg.mk12
-rw-r--r--mk/bulk/post-build24
2 files changed, 26 insertions, 10 deletions
diff --git a/mk/bulk/bsd.bulk-pkg.mk b/mk/bulk/bsd.bulk-pkg.mk
index b61622da54c..83131625a05 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.17 2001/02/01 08:47:29 dmcmahill Exp $
+# $NetBSD: bsd.bulk-pkg.mk,v 1.18 2001/02/08 19:17:38 dmcmahill Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@netbsd.org>
@@ -233,10 +233,9 @@ bulk-package:
${LS} -la ${BROKENFILE} ; \
${ECHO_MSG} ${MAKE} deinstall ; \
${DO} ${MAKE} deinstall ; \
- nerrors=`${GREP} -c '^\*\*\* Error code' ${BROKENFILE} || true`; \
- ${ECHO_MSG} " $$nerrors ${PKGPATH}/${BROKENFILE}" >> ${PKGSRCDIR}/${BROKENFILE}; \
${ECHO_MSG} "BULK> Marking all packages which depend upon ${PKGNAME} as broken:"; \
thisdir=`${GREP} " ${PKGNAME} " ${INDEXFILE} | ${AWK} '{print $$1}'` ;\
+ nbrokenby=0;\
for pkgdir in `${GREP} "^$$thisdir " ${SUPPORTSFILE} | ${SED} -e 's;^.*:;;g'`; do \
pkgname=`${GREP} "^$$pkgdir " ${INDEXFILE} | ${AWK} '{print $$2}'` ;\
${ECHO_MSG} "BULK> marking package that requires ${PKGNAME} as broken: $$pkgname ($$pkgdir)";\
@@ -253,10 +252,13 @@ bulk-package:
fi; \
${ECHO_MSG} "BULK> $$pkgname ($$pkgdir) is broken because it depends upon ${PKGNAME} ($$thisdir) which is broken." \
>> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
+ nbrokenby=`expr $$nbrokenby + 1`;\
if ! `${GREP} " $$pkgdir/${BROKENFILE}" ${PKGSRCDIR}/${BROKENFILE} >/dev/null 2>&1` ; then \
- ${ECHO} " $$pkgerr $$pkgdir/${BROKENFILE}" >> ${PKGSRCDIR}/${BROKENFILE} ;\
+ ${ECHO} " $$pkgerr $$pkgdir/${BROKENFILE} 0 " >> ${PKGSRCDIR}/${BROKENFILE} ;\
fi ;\
- done \
+ done ;\
+ nerrors=`${GREP} -c '^\*\*\* Error code' ${BROKENFILE} || true`; \
+ ${ECHO_MSG} " $$nerrors ${PKGPATH}/${BROKENFILE} $$nbrokenby " >> ${PKGSRCDIR}/${BROKENFILE} \
) 2>&1 | tee -a ${BROKENFILE}; \
fi ; \
${ECHO_MSG} "BULK> Cleaning packages and its depends" ;\
diff --git a/mk/bulk/post-build b/mk/bulk/post-build
index f24c26b5983..414957f9041 100644
--- a/mk/bulk/post-build
+++ b/mk/bulk/post-build
@@ -1,5 +1,5 @@
#!/usr/pkg/bin/perl
-# $NetBSD: post-build,v 1.9 2001/02/01 08:47:29 dmcmahill Exp $
+# $NetBSD: post-build,v 1.10 2001/02/08 19:17:38 dmcmahill Exp $
#
# Collect stuff after a pkg bulk build
#
@@ -48,6 +48,7 @@ if ($verbose) {
print "*** NetBSD $osrev/$arch\n";
print "*** Result of bulk pkgsrc build as of $date:\n";
print "\n";
+ print "Pkg\tState\tPkgs broken by\t(last modified by, maintainer)\n"
}
system("mkdir -p ${FTP}");
@@ -79,7 +80,7 @@ print HTML <<EOHTML
<P>
<TABLE>
-<TR><TH> Package <TH> State <TH> Last touched by <TH> File touched last <TH> Maintainer
+<TR><TH> Package <TH> State <TH> Pkgs Broken by <TH> Last touched by <TH> File touched last <TH> Maintainer
EOHTML
;
@@ -88,7 +89,7 @@ $nunpackaged = $nbroken = $nbrokendep = 0;
chdir("$FTP");
open(BF,"sort +1 $BROKENFILE |") or die "can't open .broken-file '$BROKENFILE'";
while (<BF>) {
- ($nerrors, $bf) = split;
+ ($nerrors, $bf, $nbrokenby) = split;
$pkg = $bf;
$pkg =~ s,/$BROKENFILE,,;
@@ -122,14 +123,27 @@ while (<BF>) {
print HTML "<TR><TD><A HREF=\"$bf\">$pkg</A>";
print HTML " <TD><FONT COLOR=$color>$state</FONT>";
+ if ($nbrokenby > 0){
+ print HTML " <TD><FONT COLOR=$color>$nbrokenby</FONT>";
+ }
+ else {
+ print HTML " <TD> ";
+ }
print HTML " <TD> $who <TD> $file";
print HTML " <TD> $maintainer\n";
($category, $dbfeed_pkg) = split('/', $pkg);
if ($nerrors != 0) {
- printf("%-23s $state\t($who, $maintainer)\n", "$pkg:")
- if $verbose;
+ if ($nbrokenby > 0){
+ printf("%-23s $state\t$nbrokenby\t($who, $maintainer)\n", "$pkg:")
+ if $verbose;
+ }
+ else {
+ printf("%-23s $state\t \t($who, $maintainer)\n", "$pkg:")
+ if $verbose;
+ }
+
}
}
close(BF);