From 5c9820e74bca2d45efaa2b16cee6ec3ac8b0d532 Mon Sep 17 00:00:00 2001 From: rillig Date: Mon, 8 Jan 2007 22:42:00 +0000 Subject: 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. --- mk/bulk/bsd.bulk-pkg.mk | 16 ++++++++++++++-- mk/bulk/post-build | 33 ++++++++++++++++++++++----------- 2 files changed, 36 insertions(+), 13 deletions(-) (limited to 'mk/bulk') 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 @@ -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 < Not packaged: $nunpackaged + + Not available: $nnot_available + Total: $ntotal @@ -581,6 +587,7 @@ tt.filename {
  • Broken packages
  • Broken dependencies
  • Not packaged
  • +
  • Not available
  • @@ -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}} ]; } -- cgit v1.2.3