2000-09-16 00:05:46 +02:00
|
|
|
#!/usr/pkg/bin/perl
|
2005-01-13 20:29:28 +01:00
|
|
|
# $NetBSD: post-build,v 1.49 2005/01/13 19:29:28 tv Exp $
|
2000-09-16 00:05:46 +02:00
|
|
|
#
|
|
|
|
# Collect stuff after a pkg bulk build
|
|
|
|
#
|
|
|
|
# (c) 2000 Hubert Feyrer, All Rights Reserved.
|
|
|
|
#
|
|
|
|
|
|
|
|
use File::Basename;
|
2005-01-13 20:29:28 +01:00
|
|
|
use POSIX qw(strftime);
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
2000-09-16 00:05:46 +02:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
my %vars;
|
|
|
|
my $verbose = 1; # set to 2 to see more command execution detail
|
2000-09-16 00:05:46 +02:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
sub my_system (@) {
|
|
|
|
print STDERR '> '.join(' ', @_)."\n" if ($verbose >= 2);
|
|
|
|
system(@_);
|
2000-09-16 00:05:46 +02:00
|
|
|
}
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
# Where config vars are stored (/bin/sh syntax)
|
|
|
|
|
|
|
|
my $BULK_BUILD_CONF = $ENV{BULK_BUILD_CONF} || (dirname($0).'/build.conf');
|
|
|
|
$BULK_BUILD_CONF = "./$BULK_BUILD_CONF" if ($BULK_BUILD_CONF !~ m:^/:);
|
|
|
|
|
2000-09-16 00:05:46 +02:00
|
|
|
# Dig given variable out of config file, and set it
|
2005-01-13 20:29:28 +01:00
|
|
|
sub getconf (@) {
|
|
|
|
open(I, ". $BULK_BUILD_CONF; for var in ".join(' ', @_)."; do eval echo \\\${\$var}; done |") || die 'cannot open pipe';
|
|
|
|
|
|
|
|
foreach my $var (@_) {
|
|
|
|
$vars{$var} = <I>;
|
|
|
|
chomp $vars{$var};
|
|
|
|
die "\$$var not defined by $BULK_BUILD_CONF" if ($vars{$var} eq '');
|
|
|
|
|
|
|
|
print STDERR "> $var=$vars{$var}\n" if ($verbose >= 2);
|
2004-03-22 22:54:48 +01:00
|
|
|
}
|
2000-09-16 00:05:46 +02:00
|
|
|
}
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
getconf(
|
|
|
|
'ADMINSIG', # "-Your Name"
|
|
|
|
'FTPURL', # "pub/NetBSD/pkgstat/`date +%Y%m%d.%H%M`"
|
|
|
|
'FTP', # "/disk1/ftp/${FTPURL}"
|
|
|
|
'FTPHOST', # ftp://ftp.machi.ne/
|
|
|
|
'REPORT', # "broken.html"
|
|
|
|
'USR_PKGSRC', # "/usr/pkgsrc"
|
|
|
|
'arch', # `uname -m`
|
|
|
|
'osrev', # `uname -r`
|
|
|
|
);
|
|
|
|
|
|
|
|
my $reportf = basename($vars{REPORT});
|
|
|
|
|
|
|
|
my $os = `uname -s`;
|
|
|
|
chomp $os;
|
|
|
|
|
|
|
|
my $BMAKE = $ENV{BMAKE} || die '$BMAKE not defined in environment';
|
|
|
|
|
|
|
|
sub getmakevars (@) {
|
|
|
|
open(I, "cd $vars{USR_PKGSRC}/pkgtools/pkglint && $BMAKE show-vars BATCH=1 VARNAMES='".join(' ', @_)."' |") || die 'cannot open pipe';
|
|
|
|
|
|
|
|
foreach my $var (@_) {
|
|
|
|
$vars{$var} = <I>;
|
|
|
|
chomp $vars{$var};
|
|
|
|
die "\${$var} not defined by $BMAKE" if ($vars{$var} eq '');
|
2000-09-16 00:05:46 +02:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
print STDERR "> $var=$vars{$var}\n" if ($verbose >= 2);
|
|
|
|
}
|
|
|
|
}
|
2003-08-18 21:19:33 +02:00
|
|
|
|
2004-11-16 19:34:12 +01:00
|
|
|
# Extract the names of the files used for the build log and broken build logs.
|
2004-04-09 20:43:14 +02:00
|
|
|
# These have defaults set by bsd.bulk-pkg.mk and may be overridden in
|
|
|
|
# /etc/mk.conf
|
2005-01-13 20:29:28 +01:00
|
|
|
getmakevars(qw(
|
|
|
|
BROKENFILE
|
|
|
|
BROKENWRKLOG
|
|
|
|
BULK_DBFILE
|
|
|
|
DEPENDSFILE
|
|
|
|
DEPENDSTREEFILE
|
|
|
|
FIND
|
|
|
|
GTAR
|
|
|
|
INDEXFILE
|
|
|
|
LOCALBASE
|
|
|
|
ORDERFILE
|
|
|
|
PKG_DBDIR
|
|
|
|
STARTFILE
|
|
|
|
SUPPORTSFILE
|
|
|
|
X11BASE
|
|
|
|
));
|
|
|
|
|
|
|
|
my $bulkdbfile = basename($vars{BULK_DBFILE});
|
|
|
|
my $dtfile = basename($vars{DEPENDSTREEFILE});
|
|
|
|
my $depfile = basename($vars{DEPENDSFILE});
|
|
|
|
my $supfile = basename($vars{SUPPORTSFILE});
|
|
|
|
my $indfile = basename($vars{INDEXFILE});
|
|
|
|
my $ordfile = basename($vars{ORDERFILE});
|
|
|
|
|
|
|
|
my $startdate = (stat($vars{STARTFILE}))[9];
|
|
|
|
my $enddate = '';
|
2004-02-06 00:53:16 +01:00
|
|
|
if ($startdate == 0) {
|
|
|
|
$startdate = "unknown";
|
|
|
|
} else {
|
2004-02-08 13:54:05 +01:00
|
|
|
local $ENV{TZ} = "UTC";
|
2005-01-13 20:29:28 +01:00
|
|
|
$startdate = strftime("%c %Z", gmtime($startdate));
|
|
|
|
$enddate = strftime("%c %Z", gmtime(time()));
|
2004-02-06 00:53:16 +01:00
|
|
|
}
|
2004-01-31 04:30:49 +01:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
my $report_head = <<EOF;
|
2004-03-11 02:42:11 +01:00
|
|
|
Package Breaks Maintainer
|
|
|
|
--------------------------------------------------------------
|
2004-01-31 04:30:49 +01:00
|
|
|
EOF
|
2005-01-13 20:29:28 +01:00
|
|
|
my $report_form = <<EOF;
|
2004-03-11 02:42:11 +01:00
|
|
|
@<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<
|
2004-01-31 04:30:49 +01:00
|
|
|
EOF
|
2005-01-13 20:29:28 +01:00
|
|
|
# $pkg, $nbrokenby, $maintainer
|
2000-09-16 00:05:46 +02:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
|
|
|
|
my_system("mkdir -p $vars{FTP}");
|
2000-09-16 00:05:46 +02:00
|
|
|
|
|
|
|
# Copy over the output from the build process
|
2005-01-13 20:29:28 +01:00
|
|
|
chdir($vars{USR_PKGSRC});
|
|
|
|
my_system("/bin/ls -1 $vars{BROKENFILE} $vars{BROKENWRKLOG} */*/$vars{BROKENFILE} */*/$vars{BROKENWRKLOG} 2>/dev/null | $vars{GTAR} -T - -plcf - | (cd $vars{FTP}; $vars{GTAR} -plxf -)");
|
2000-09-16 00:05:46 +02:00
|
|
|
|
2001-05-03 23:46:32 +02:00
|
|
|
# Copy over the cache files used during the build
|
2005-01-13 20:29:28 +01:00
|
|
|
foreach my $f qw(BULK_DBFILE DEPENDSTREEFILE DEPENDSFILE SUPPORTSFILE INDEXFILE ORDERFILE) {
|
|
|
|
my_system("cp $vars{$f} $vars{FTP}") if -f $vars{$f};
|
2000-09-16 00:05:46 +02:00
|
|
|
}
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
chdir($vars{FTP});
|
2004-01-31 04:30:49 +01:00
|
|
|
writeReport();
|
2000-09-16 00:05:46 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Adjust "last" symlink
|
|
|
|
#
|
|
|
|
{
|
2005-01-13 20:29:28 +01:00
|
|
|
my ($base, $dir) = ($vars{FTP} =~ m|^(.*)/([^/]*)$|);
|
2000-09-16 00:05:46 +02:00
|
|
|
|
|
|
|
unlink("$base/last");
|
|
|
|
symlink($dir, "$base/last");
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
2005-01-13 20:29:28 +01:00
|
|
|
# Generate leftovers-$vars{arch}.html: files not deleted
|
|
|
|
# Leftover files are copied to leftovers-$vars{arch} dir, and linked from
|
|
|
|
# leftovers-$vars{arch}.html
|
2000-09-16 00:05:46 +02:00
|
|
|
#
|
|
|
|
{
|
2005-01-13 20:29:28 +01:00
|
|
|
chdir($vars{FTP});
|
|
|
|
my_system("mkdir -p leftovers-$vars{arch}");
|
2000-09-16 00:05:46 +02:00
|
|
|
|
|
|
|
# Find files since last build:
|
2005-01-13 20:29:28 +01:00
|
|
|
my $leftovers_txt = "leftovers-$vars{arch}.txt";
|
|
|
|
my $leftovers_html = "leftovers-$vars{arch}.html";
|
|
|
|
|
|
|
|
my_system("$vars{FIND} $vars{LOCALBASE}/ -newer $vars{STARTFILE} -type f -print >>$leftovers_txt");
|
|
|
|
my_system("$vars{FIND} $vars{X11BASE}/ -newer $vars{STARTFILE} -type f -print >>$leftovers_txt");
|
2000-09-16 00:05:46 +02:00
|
|
|
|
|
|
|
# Strip perl-files:
|
2005-01-13 20:29:28 +01:00
|
|
|
my $perlfiles;
|
2004-01-20 13:37:08 +01:00
|
|
|
{
|
|
|
|
local $/;
|
|
|
|
undef $/;
|
2004-11-22 13:53:56 +01:00
|
|
|
$perlfiles = `pkg_info -qL perl*`;
|
2004-01-20 13:37:08 +01:00
|
|
|
}
|
2005-01-13 20:29:28 +01:00
|
|
|
|
|
|
|
my $perlfiles_pattern = $perlfiles;
|
|
|
|
$perlfiles_pattern =~ s/\n/|/g;
|
2004-01-20 13:37:08 +01:00
|
|
|
$perlfiles_pattern =~ s/|$//;
|
|
|
|
|
|
|
|
open (LEFT, $leftovers_txt) or die "can't read $leftovers_txt: $!";
|
2005-01-13 20:29:28 +01:00
|
|
|
my @left = <LEFT>;
|
2004-01-20 13:37:08 +01:00
|
|
|
close (LEFT);
|
2005-01-13 20:29:28 +01:00
|
|
|
my @leftovers = grep(!/^(?:${perlfiles_pattern})$/, @left);
|
|
|
|
|
|
|
|
if (index($vars{PKG_DBDIR}, $vars{LOCALBASE}) == 0) {
|
|
|
|
# If PKG_DBDIR is inside LOCALBASE, exclude it from the leftovers.
|
|
|
|
@leftovers = grep { index($_, $vars{PKG_DBDIR}) != 0 } @leftovers;
|
|
|
|
}
|
2000-09-16 00:05:46 +02:00
|
|
|
|
2004-01-20 13:37:08 +01:00
|
|
|
open (LEFT, ">$leftovers_txt") or die "can't write $leftovers_txt: $!";
|
|
|
|
print LEFT @leftovers;
|
|
|
|
close (LEFT);
|
|
|
|
|
|
|
|
if (scalar(@leftovers)) {
|
|
|
|
# Store leftovers, for easier identification:
|
2005-01-13 20:29:28 +01:00
|
|
|
my_system("$vars{GTAR} -T $leftovers_txt -plcf - | (cd leftovers-$vars{arch}; $vars{GTAR} -plxf -)");
|
2004-01-20 13:37:08 +01:00
|
|
|
}
|
2000-09-16 00:05:46 +02:00
|
|
|
|
|
|
|
# Add links to leftover list:
|
2004-01-20 13:37:08 +01:00
|
|
|
open (OUT, "> $leftovers_html")
|
|
|
|
or die "can't write $leftovers_html";
|
2004-01-31 04:30:49 +01:00
|
|
|
print OUT <<EOOUT;
|
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<pre>
|
2000-09-16 00:05:46 +02:00
|
|
|
EOOUT
|
2004-01-20 13:37:08 +01:00
|
|
|
foreach (@leftovers) {
|
2004-01-31 04:30:49 +01:00
|
|
|
chomp;
|
2005-01-13 20:29:28 +01:00
|
|
|
print OUT "<a href=\"$vars{FTPHOST}/$vars{FTPURL}/leftovers-$vars{arch}$_\">$_</a>\n";
|
2000-09-16 00:05:46 +02:00
|
|
|
}
|
2004-01-31 04:30:49 +01:00
|
|
|
print OUT <<EOOUT2;
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|
2000-09-16 00:05:46 +02:00
|
|
|
EOOUT2
|
|
|
|
close(OUT);
|
|
|
|
}
|
|
|
|
|
2004-01-31 04:30:49 +01:00
|
|
|
# print the result of a single broken package
|
2005-01-13 20:29:28 +01:00
|
|
|
sub pkgResult ($$) {
|
2004-01-31 04:30:49 +01:00
|
|
|
my ($pinfo, $state) = @_;
|
|
|
|
my $pkg = $pinfo->{pkg};
|
|
|
|
my $nbrokenby = $pinfo->{nbrokenby};
|
|
|
|
my $nerrors = $pinfo->{nerrors};
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
my @idents = `$vars{FIND} $vars{USR_PKGSRC}/$pkg -type f -print | xargs grep \\\$NetBSD`;
|
|
|
|
my $datetime = "";
|
|
|
|
my $file = "";
|
|
|
|
my $ver = "";
|
|
|
|
foreach my $ident (@idents) {
|
2004-01-31 04:30:49 +01:00
|
|
|
$ident =~ /\$[N]etBSD: ([^ ]*),v ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) Exp \$/;
|
|
|
|
if ("$3 $4" gt $datetime) {
|
|
|
|
$datetime = "$3 $4";
|
|
|
|
$file = $1;
|
|
|
|
$ver = $1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
my $maintainer = `grep ^MAINTAINER $vars{USR_PKGSRC}/$pkg/Makefile`;
|
2004-01-31 04:30:49 +01:00
|
|
|
$maintainer =~ s/MAINTAINER=[ \t]*//;
|
|
|
|
$maintainer =~ s/</</g;
|
|
|
|
$maintainer =~ s/>/>/g;
|
|
|
|
chomp($maintainer);
|
|
|
|
|
|
|
|
(my $state_style = $state) =~ s/ //g;
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
my $nbrokenby_html = '<td> </td>';
|
2004-01-31 04:30:49 +01:00
|
|
|
$nbrokenby_html =
|
|
|
|
'<td align="right" class="pkg-'.$state_style.'">'.$nbrokenby.'</td>'
|
|
|
|
if $nbrokenby > 0;
|
|
|
|
|
2004-07-15 13:39:11 +02:00
|
|
|
if ($pinfo->{nerrors} != 0 && $verbose && $state eq "broken") {
|
2004-03-13 12:55:40 +01:00
|
|
|
print swrite($report_form, $pkg, $nbrokenby > 0 ? $nbrokenby : "", $maintainer);
|
2004-01-31 04:30:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return <<EOHTML;
|
|
|
|
<tr>
|
|
|
|
<td><a class="pkg-$state_style" href="$pinfo->{bf}" title="build log for $pkg">$pkg</a></td>
|
|
|
|
$nbrokenby_html
|
|
|
|
<td>$file</td>
|
|
|
|
<td>$maintainer</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
EOHTML
|
|
|
|
}
|
|
|
|
|
|
|
|
# write the build report
|
|
|
|
sub writeReport {
|
|
|
|
my $broken = getBroken();
|
2005-01-13 20:29:28 +01:00
|
|
|
my $nbroken = scalar(@{$broken->{"broken"}});
|
|
|
|
my $nbrokendep = scalar(@{$broken->{"broken depends"}});
|
|
|
|
my $nunpackaged = scalar(@{$broken->{"not packaged"}});
|
|
|
|
my $nbrokentot = $nbroken + $nbrokendep;
|
|
|
|
my $ntotal = $nunpackaged + $nbroken + $nbrokendep;
|
2004-01-31 04:30:49 +01:00
|
|
|
|
2004-02-08 10:13:43 +01:00
|
|
|
# determine the number of packages attempted, and then successful
|
2005-01-13 20:29:28 +01:00
|
|
|
open(ORDER, $vars{ORDERFILE}) || die "can't open $vars{ORDERFILE}: $!";
|
2004-02-08 10:13:43 +01:00
|
|
|
my @order = <ORDER>;
|
|
|
|
close(ORDER);
|
|
|
|
my $nattempted = scalar(@order);
|
|
|
|
my $nsuccessful = $nattempted - $ntotal;
|
|
|
|
|
2004-01-31 04:30:49 +01:00
|
|
|
if ($verbose) {
|
|
|
|
print <<EOF;
|
|
|
|
pkgsrc bulk build results
|
2005-01-13 20:29:28 +01:00
|
|
|
$os $vars{osrev}/$vars{arch}
|
2004-01-31 04:30:49 +01:00
|
|
|
|
|
|
|
Summary:
|
|
|
|
|
|
|
|
EOF
|
|
|
|
my $summary_form = <<EOF;
|
|
|
|
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
|
|
EOF
|
|
|
|
print swrite($summary_form, "Build started:", $startdate);
|
|
|
|
print swrite($summary_form, "Build ended:", $enddate);
|
2005-01-13 20:29:28 +01:00
|
|
|
print swrite($summary_form, '', '');
|
2004-02-08 10:13:43 +01:00
|
|
|
print swrite($summary_form, "Successfully packaged:", $nsuccessful);
|
2004-01-31 04:30:49 +01:00
|
|
|
print swrite($summary_form, "Packages really broken:", $nbroken);
|
|
|
|
print swrite($summary_form, "Pkgs broken due to them:", $nbrokendep);
|
|
|
|
print swrite($summary_form, "Total broken:", $nbrokentot);
|
|
|
|
print swrite($summary_form, "Not packaged:", $nunpackaged);
|
|
|
|
print swrite($summary_form, "Total:", $ntotal);
|
|
|
|
print <<EOF;
|
|
|
|
|
|
|
|
Packages not listed here resulted in a binary package. The build
|
|
|
|
report, including logs of failed/not-packaged is available from:
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
$vars{FTPHOST}/$vars{FTPURL}/$reportf
|
2004-01-31 04:30:49 +01:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
open(HTML, ">$vars{REPORT}") or die "Can't write $vars{REPORT}: $!\n";
|
2004-01-31 04:30:49 +01:00
|
|
|
print HTML <<EOHTML;
|
|
|
|
<html>
|
|
|
|
<head>
|
2005-01-13 20:29:28 +01:00
|
|
|
<title>$os $vars{osrev}/$vars{arch} bulk package build</title>
|
2004-01-31 04:30:49 +01:00
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
|
|
|
|
|
|
|
body {
|
|
|
|
Font-Family: Tahoma, Verdana, sans-serif;
|
|
|
|
Line-Height: 1.3em;
|
|
|
|
Text-Decoration: None;
|
|
|
|
Color: black;
|
|
|
|
Background-Color: white;
|
|
|
|
Border-Width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
table {
|
|
|
|
Border-Width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
table td {
|
|
|
|
Font-Family: Tahoma, Verdana, sans-serif;
|
|
|
|
line-height: 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:link {
|
|
|
|
Color: #3535c5;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:visited {
|
|
|
|
Color: #700080;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:hover {
|
|
|
|
Color: #6565e5;
|
|
|
|
Text-Decoration: underline;
|
|
|
|
}
|
|
|
|
|
|
|
|
tr {
|
|
|
|
Vertical-Align: top;
|
|
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
|
|
Vertical-Align: top;
|
|
|
|
}
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
Font-Size: 3.5ex;
|
|
|
|
Line-Height: 1em;
|
|
|
|
Color: #000066;
|
|
|
|
}
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
Font-Size: 2.5ex;
|
|
|
|
Line-Height: 1em;
|
|
|
|
Color: #660000;
|
|
|
|
}
|
|
|
|
|
|
|
|
h3 {
|
|
|
|
Font-Size: 2ex;
|
|
|
|
Color: #660066;
|
|
|
|
}
|
|
|
|
|
|
|
|
h4 {
|
|
|
|
Font-Size: 1.8ex;
|
|
|
|
Color: #006600;
|
|
|
|
}
|
|
|
|
|
|
|
|
tt.filename {
|
|
|
|
Line-Height: 1.3em;
|
|
|
|
Color: #AA0000;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pkgname {
|
|
|
|
Font-Family: Arial, Helvetica, Courier, fixed;
|
|
|
|
Font-Style: Italic;
|
|
|
|
Text-Decoration: none;
|
|
|
|
Line-Height: 1.3em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pkg-broken {
|
|
|
|
Color: red;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pkg-brokendepends {
|
|
|
|
Color: orange;
|
|
|
|
}
|
|
|
|
|
|
|
|
.pkg-notpackaged {
|
|
|
|
Color: blue;
|
|
|
|
}
|
|
|
|
-->
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
2004-07-15 13:57:26 +02:00
|
|
|
<body bgcolor="white" text="black" link="#3535c5" vlink="#700080" alink="#3535c5">
|
2004-01-31 04:30:49 +01:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
<a name="top"></a>
|
2004-01-31 04:30:49 +01:00
|
|
|
<h1>pkgsrc bulk build results</h1>
|
2005-01-13 20:29:28 +01:00
|
|
|
<h2>$os $vars{osrev}/$vars{arch}</h2>
|
2004-01-31 04:30:49 +01:00
|
|
|
|
|
|
|
<h3>Summary</h3>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Build started: <td align="right">$startdate</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Build ended: <td align="right">$enddate</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td> </td> <td> </td>
|
|
|
|
</tr>
|
2004-02-08 10:13:43 +01:00
|
|
|
<tr>
|
|
|
|
<td>Successfully packaged:</td> <td align="right">$nsuccessful</td>
|
|
|
|
</tr>
|
2004-01-31 04:30:49 +01:00
|
|
|
<tr class="pkg-broken">
|
2004-02-08 10:13:43 +01:00
|
|
|
<td>Packages really broken:</td> <td align="right">$nbroken</td>
|
2004-01-31 04:30:49 +01:00
|
|
|
</tr>
|
|
|
|
<tr class="pkg-brokendepends">
|
2004-02-08 10:13:43 +01:00
|
|
|
<td>Packages broken due to them:</td> <td align="right">$nbrokendep</td>
|
2004-01-31 04:30:49 +01:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2004-02-08 10:13:43 +01:00
|
|
|
<td>Total broken:</td> <td align="right">$nbrokentot</td>
|
2004-01-31 04:30:49 +01:00
|
|
|
</tr>
|
|
|
|
<tr class="pkg-notpackaged">
|
2004-02-08 10:13:43 +01:00
|
|
|
<td>Not packaged:</td> <td align="right">$nunpackaged</td>
|
2004-01-31 04:30:49 +01:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2004-02-08 10:13:43 +01:00
|
|
|
<td>Total:</td> <td align="right">$ntotal</td>
|
2004-01-31 04:30:49 +01:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Packages not listed here resulted in a <a
|
2005-01-13 20:29:28 +01:00
|
|
|
href="../../packages/" title="binary packages for $os $vars{osrev}/$vars{arch}">binary
|
2004-01-31 04:30:49 +01:00
|
|
|
package</a>. Results of failed packages are available below.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Files leftover from the build (because of broken PLISTs, etc.) can be
|
2005-01-13 20:29:28 +01:00
|
|
|
found in <a href="leftovers-$vars{arch}.html" title="leftover files">this
|
2004-01-31 04:30:49 +01:00
|
|
|
list</a>.
|
|
|
|
</p>
|
2004-07-15 13:57:26 +02:00
|
|
|
|
|
|
|
<p>
|
|
|
|
Jump to:<br/>
|
|
|
|
<ul>
|
|
|
|
<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>
|
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
|
2004-01-31 04:30:49 +01:00
|
|
|
EOHTML
|
|
|
|
|
|
|
|
my %state_head = (
|
|
|
|
"broken" => "Broken packages",
|
|
|
|
"broken depends" => "Broken dependencies",
|
|
|
|
"not packaged" => "Not packaged"
|
|
|
|
);
|
|
|
|
|
2004-07-15 13:39:11 +02:00
|
|
|
# only include broken packages in the email, see also pkgResult().
|
|
|
|
if ($verbose && scalar(@{$broken->{"broken"}})) {
|
|
|
|
print "\n\n$state_head{broken}\n\n";
|
|
|
|
print $report_head;
|
|
|
|
}
|
|
|
|
|
2004-01-31 04:30:49 +01:00
|
|
|
foreach my $state ("broken", "broken depends", "not packaged") {
|
|
|
|
next unless scalar(@{$broken->{$state}});
|
2004-07-15 13:39:11 +02:00
|
|
|
|
2004-01-31 04:30:49 +01:00
|
|
|
print HTML <<EOHTML;
|
2004-07-15 13:57:26 +02:00
|
|
|
|
2005-01-13 20:29:28 +01:00
|
|
|
<a name="$state"></a>
|
2004-01-31 04:30:49 +01:00
|
|
|
<h2>$state_head{$state}</h2>
|
|
|
|
<table width="100%">
|
|
|
|
<tr align="left">
|
|
|
|
<th width="30%">Package</th>
|
|
|
|
<th>Breaks</th>
|
|
|
|
<th>File touched last</th>
|
|
|
|
<th>Maintainer</th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
EOHTML
|
|
|
|
foreach my $pinfo (@{$broken->{$state}}) {
|
|
|
|
print HTML pkgResult($pinfo, $state);
|
|
|
|
}
|
|
|
|
|
2004-07-15 13:57:26 +02:00
|
|
|
print HTML <<EOHTML;
|
|
|
|
</table>
|
|
|
|
<hr>
|
|
|
|
<a href="#top">Up to top</a><br/>
|
|
|
|
<hr>
|
|
|
|
EOHTML
|
2004-01-31 04:30:49 +01:00
|
|
|
}
|
2004-07-15 13:57:26 +02:00
|
|
|
|
2004-01-31 04:30:49 +01:00
|
|
|
print HTML <<EOHTML;
|
|
|
|
<hr>
|
|
|
|
<p>
|
|
|
|
The following cache files were used during the build:
|
|
|
|
</p>
|
|
|
|
<ul>
|
2004-04-08 00:56:34 +02:00
|
|
|
<li>The <a href="$bulkdbfile">SPECIFIC_PKGS bulk database file</a>.</li>
|
2004-01-31 04:30:49 +01:00
|
|
|
<li>The <a href="$dtfile">depends tree file</a>.</li>
|
|
|
|
<li>The <a href="$depfile">depends file</a>.</li>
|
|
|
|
<li>The <a href="$supfile">supports file</a>.</li>
|
|
|
|
<li>The <a href="$indfile">index file</a>.</li>
|
|
|
|
<li>The <a href="$ordfile">build order file</a>.</li>
|
|
|
|
</ul>
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<ul>
|
|
|
|
<!-- <li>See the list of <a href="../index.html">all log files</a>. -->
|
|
|
|
<li>Visit the <a href="http://www.NetBSD.org">NetBSD web site</a>.
|
|
|
|
<li>Learn more about
|
|
|
|
<a href="http://www.NetBSD.org/Documentation/software/packages.html">
|
|
|
|
The NetBSD Packages Collection</a>.
|
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
EOHTML
|
|
|
|
close(HTML);
|
|
|
|
|
|
|
|
if ($verbose) {
|
2005-01-13 20:29:28 +01:00
|
|
|
print "\n\n$vars{ADMINSIG}\n\n";
|
2004-03-28 22:35:29 +02:00
|
|
|
print "[* This message was created by the Packages Collection bulk build software *]\n";
|
2004-01-31 04:30:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# get and sort the broken packages
|
|
|
|
sub getBroken {
|
2005-01-13 20:29:28 +01:00
|
|
|
my $res = {
|
|
|
|
'broken' => [],
|
|
|
|
'broken depends' => [],
|
|
|
|
'not packaged' => [],
|
|
|
|
};
|
|
|
|
|
|
|
|
open (BF, $vars{BROKENFILE}) || return $res;
|
2004-01-31 04:30:49 +01:00
|
|
|
my @in = <BF>;
|
|
|
|
close (BF);
|
|
|
|
|
|
|
|
foreach (@in) {
|
|
|
|
chomp;
|
|
|
|
my ($nerrors, $bf, $nbrokenby) = split;
|
2005-01-13 20:29:28 +01:00
|
|
|
my $pkg = $bf;
|
|
|
|
$pkg =~ s,/$vars{BROKENFILE},,;
|
2004-01-31 04:30:49 +01:00
|
|
|
my %tmp = (
|
|
|
|
bf => $bf,
|
|
|
|
pkg => $pkg,
|
|
|
|
nbrokenby => $nbrokenby,
|
|
|
|
nerrors => $nerrors,
|
|
|
|
);
|
|
|
|
|
|
|
|
if ($nerrors > 0) {
|
|
|
|
push(@{$res->{"broken"}}, \%tmp);
|
|
|
|
} elsif ($nerrors == -1) {
|
|
|
|
push(@{$res->{"broken depends"}}, \%tmp);
|
|
|
|
} else {
|
|
|
|
push(@{$res->{"not packaged"}}, \%tmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# sort pkgs in each state
|
|
|
|
foreach my $state ("broken", "broken depends", "not packaged") {
|
|
|
|
$res->{$state} = [ sort { $a->{pkg} cmp $b->{pkg} } @{$res->{$state}} ];
|
|
|
|
}
|
|
|
|
|
|
|
|
return $res;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub swrite {
|
|
|
|
my $format = shift;
|
|
|
|
$^A = "";
|
|
|
|
formline($format, @_);
|
|
|
|
$^A =~ s/\n\n/\n/;
|
|
|
|
return $^A;
|
2000-09-16 00:05:46 +02:00
|
|
|
}
|