diff options
author | rillig <rillig@pkgsrc.org> | 2007-01-08 22:42:00 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-01-08 22:42:00 +0000 |
commit | 10db1892ddcf6a2b47e3aa27ec06b84b7db68e40 (patch) | |
tree | f8bd6209657e537e6ae69ca1ae67c5394aa589e3 /mk | |
parent | cc39ca89fc8188cf5a54ad833d852eb425998dab (diff) | |
download | pkgsrc-10db1892ddcf6a2b47e3aa27ec06b84b7db68e40.tar.gz |
Packages that are not available on the current platform (and the
packages depending on them) are listed in a separate category in the
bulk build report.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bulk/bsd.bulk-pkg.mk | 16 | ||||
-rw-r--r-- | mk/bulk/post-build | 33 |
2 files changed, 36 insertions, 13 deletions
diff --git a/mk/bulk/bsd.bulk-pkg.mk b/mk/bulk/bsd.bulk-pkg.mk index 36b2f0c5ccd..ba285be6ef2 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.130 2006/12/14 14:37:32 dmcmahill Exp $ +# $NetBSD: bsd.bulk-pkg.mk,v 1.131 2007/01/08 22:42:00 rillig Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org> @@ -100,6 +100,10 @@ BUILD_SUCCEEDED_FILE?= .build_succeeded${BULK_ID} # This file exists to mark a package as broken BROKENFILE?= .broken${BULK_ID}.html +# When this file exists for a package, it has been marked as not to be +# available on this platform. +NOT_AVAILABLE_FILE?= .bulk-not_available + # This file is the work log for a broken package BROKENWRKLOG?= .broken${BULK_ID}.work.txt @@ -246,7 +250,7 @@ bulk-cache: cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printdepends ${BROKENFILE:Q} ${BULKFILESDIR:Q} > ${DEPENDSTREEFILE:Q} @${BULK_MSG} "Generating package name <=> package directory cross reference file" @${BULK_MSG_CONT} "(this may take a while)." - cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printindex ${BROKENFILE:Q} ${BULKFILESDIR:Q} > ${INDEXFILE:Q} + cd ${PKGSRCDIR} && ${SETENV} BMAKE=${MAKE:Q} ${SH} mk/bulk/printindex ${NOT_AVAILABLE_FILE} ${BULKFILESDIR:Q} > ${INDEXFILE:Q} .else @${BULK_MSG} "Extracting database for SPECIFIC_PKGS subset of pkgsrc" @${BULK_MSG_CONT} "along with their dependencies" @@ -432,6 +436,10 @@ bulk-package: for pkgdir in `${SED} -n -e "/^${_ESCPKGPATH} / s;^[^:]*:;;p" ${DEPENDSFILE}` ${BULK_PREREQ} ; do \ pkgname=`${AWK} '$$1 == "'"$$pkgdir"'" { print $$2; }' ${INDEXFILE}`; \ if [ -z "$$pkgname" ]; then ${BULK_MSG} "WARNING: could not find package name for directory $$pkgdir"; continue ; fi ;\ + if [ -f "${BULKFILESDIR}/$$pkgdir/${NOT_AVAILABLE_FILE}" ]; then \ + ${ECHO} "The dependency $$pkgname ($$pkgdir) is not available." >> ${BULKFILESDIR}/${PKGPATH}/${NOT_AVAILABLE_FILE}; \ + exit 1; \ + fi; \ pkgfile=${PACKAGES}/All/$${pkgname}${PKG_SUFX} ;\ if ${PKG_INFO} -qe $$pkgname ; then \ ${BULK_MSG} "Required package $$pkgname ($$pkgdir) is already installed" ; \ @@ -589,3 +597,7 @@ bulk-install: ${ECHO_MSG} ${MAKE} bulk-package PRECLEAN=no; \ ${DO} ${RECURSIVE_MAKE} bulk-package PRECLEAN=no; \ fi + +bulk-info: .PHONY + @${ECHO} pkgname ${PKGPATH} ${PKGNAME} + @:; ${DEPENDS:@d@${ECHO} ${PKGPATH} ${d:Q}@; } diff --git a/mk/bulk/post-build b/mk/bulk/post-build index 1d6e6a317d7..fd96d5bb957 100644 --- a/mk/bulk/post-build +++ b/mk/bulk/post-build @@ -1,5 +1,5 @@ #!/usr/pkg/bin/perl -# $NetBSD: post-build,v 1.66 2006/12/15 13:15:06 martti Exp $ +# $NetBSD: post-build,v 1.67 2007/01/08 22:42:00 rillig Exp $ # # Collect stuff after a pkg bulk build # @@ -172,6 +172,7 @@ get_mk_conf_vars(qw( INDEXFILE LOCALBASE MACHINE_ARCH + NOT_AVAILABLE_FILE ORDERFILE PAX PKG_DBDIR @@ -391,6 +392,7 @@ sub writeReport { my $nbroken = scalar(@{$broken->{"broken"}}); my $nbrokendep = scalar(@{$broken->{"broken depends"}}); my $nunpackaged = scalar(@{$broken->{"not packaged"}}); + my $nnot_available = scalar(@{$broken->{"not available"}}); my $nbrokentot = $nbroken + $nbrokendep; my $ntotal = $nunpackaged + $nbroken + $nbrokendep; @@ -418,6 +420,7 @@ EOF print_summary_line("Pkgs broken due to them:", $nbrokendep); print_summary_line("Total broken:", $nbrokentot); print_summary_line("Not packaged:", $nunpackaged); + print_summary_line("Not available:", $nnot_available); print_summary_line("Total:", $ntotal); print <<EOF; @@ -557,6 +560,9 @@ tt.filename { <tr class="pkg-notpackaged"> <td>Not packaged:</td> <td align="right">$nunpackaged</td> </tr> +<tr class="pkg-notavailable"> + <td>Not available:</td> <td align="right">$nnot_available</td> +</tr> <tr> <td>Total:</td> <td align="right">$ntotal</td> </tr> @@ -581,6 +587,7 @@ tt.filename { <li><a href="#broken">Broken packages</a></li> <li><a href="#broken depends">Broken dependencies</a></li> <li><a href="#not packaged">Not packaged</a></li> + <li><a href="#not available">Not available</a></li> </ul> </p> @@ -590,10 +597,11 @@ EOHTML "topten" => "Top Ten Offenders", "broken" => "Broken packages", "broken depends" => "Broken dependencies", - "not packaged" => "Not packaged" + "not packaged" => "Not packaged", + "not available" => "Not available", ); - foreach my $state ("topten", "broken", "broken depends", "not packaged") { + foreach my $state ("topten", "broken", "broken depends", "not packaged", "not available") { next unless scalar(@{$broken->{$state}}); if ($verbose && ($state eq "topten" || $state eq "broken")) { @@ -668,7 +676,8 @@ sub getBroken { 'broken' => [], 'broken depends' => [], 'not packaged' => [], - 'topten' => [] + 'topten' => [], + "not available" => [], }; open (BF, $vars{BROKENFILE}) || return $res; @@ -680,24 +689,26 @@ sub getBroken { my ($nerrors, $bf, $nbrokenby) = split; my $pkg = $bf; $pkg =~ s,/$vars{BROKENFILE},,; - my %tmp = ( + my $tmp = { bf => $bf, pkg => $pkg, nbrokenby => $nbrokenby, nerrors => $nerrors, - ); + }; - if ($nerrors > 0) { - push(@{$res->{"broken"}}, \%tmp); + if (-f "$vars{BULKFILESDIR}/$pkg/$vars{NOT_AVAILABLE_FILE}") { + push(@{$res->{"not available"}}, $tmp); + } elsif ($nerrors > 0) { + push(@{$res->{"broken"}}, $tmp); } elsif ($nerrors == -1) { - push(@{$res->{"broken depends"}}, \%tmp); + push(@{$res->{"broken depends"}}, $tmp); } else { - push(@{$res->{"not packaged"}}, \%tmp); + push(@{$res->{"not packaged"}}, $tmp); } } # sort pkgs in each state - foreach my $state ("broken", "broken depends", "not packaged") { + foreach my $state ("broken", "broken depends", "not packaged", "not available") { $res->{$state} = [ sort { $a->{pkg} cmp $b->{pkg} } @{$res->{$state}} ]; } |