keep the output from dump-vars around, and save it in the logfile is
something bad happens. get rid of special reporter for Vars, E= is enough, people should look in the paths/logfile now.
This commit is contained in:
parent
7406805f55
commit
1c010712c9
@ -1,7 +1,7 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: dpb,v 1.5 2010/10/27 22:53:32 espie Exp $
|
||||
# $OpenBSD: dpb,v 1.6 2010/10/28 14:54:38 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -183,8 +183,7 @@ my $builder = DPB::PortBuilder->new(
|
||||
|
||||
my $locker = DPB::Locks->new($lockdir);
|
||||
my $engine = DPB::Engine->new($builder, $heuristics, $logger, $locker);
|
||||
my $reporter = DPB::Reporter->new($opt_x, $heuristics, "DPB::Core",
|
||||
"DPB::Vars", $engine);
|
||||
my $reporter = DPB::Reporter->new($opt_x, $heuristics, "DPB::Core", $engine);
|
||||
while (!DPB::Core->avail) {
|
||||
DPB::Core->reap;
|
||||
sleep 1;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Grabber.pm,v 1.4 2010/10/28 10:33:20 espie Exp $
|
||||
# $OpenBSD: Grabber.pm,v 1.5 2010/10/28 14:54:38 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -27,6 +27,7 @@ sub new
|
||||
my ($class, $ports, $make, $logger, $engine, $dpb, $endcode) = @_;
|
||||
my $o = bless { ports => $ports, make => $make,
|
||||
loglist => DPB::Util->make_hot($logger->open("vars")),
|
||||
logger => $logger,
|
||||
engine => $engine,
|
||||
dpb => $dpb,
|
||||
keep_going => 1,
|
||||
@ -55,7 +56,7 @@ sub grab_subdirs
|
||||
{
|
||||
my ($self, $core, $list) = @_;
|
||||
DPB::Vars->grab_list($core, $self->{ports}, $self->{make}, $list,
|
||||
$self->{loglist}, $self->{dpb},
|
||||
$self->{loglist}, $self->{logger}, $self->{dpb},
|
||||
sub {
|
||||
$self->finish(shift);
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Vars.pm,v 1.3 2010/10/28 10:33:20 espie Exp $
|
||||
# $OpenBSD: Vars.pm,v 1.4 2010/10/28 14:54:38 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -20,23 +20,6 @@ use warnings;
|
||||
package DPB::Vars;
|
||||
|
||||
use OpenBSD::Paths;
|
||||
my @errors = ();
|
||||
my $last_errors = 0;
|
||||
|
||||
sub report
|
||||
{
|
||||
return join('', @errors);
|
||||
}
|
||||
|
||||
sub important
|
||||
{
|
||||
my $class = shift;
|
||||
if (@errors > $last_errors) {
|
||||
$last_errors = @errors;
|
||||
return $class->report;
|
||||
}
|
||||
}
|
||||
|
||||
sub get
|
||||
{
|
||||
my ($class, $make, @names) = @_;
|
||||
@ -89,7 +72,8 @@ sub subdirlist
|
||||
|
||||
sub grab_list
|
||||
{
|
||||
my ($class, $core, $ports, $make, $subdirs, $log, $dpb, $code) = @_;
|
||||
my ($class, $core, $ports, $make, $subdirs, $log, $logger, $dpb,
|
||||
$code) = @_;
|
||||
$core->start_pipe(sub {
|
||||
my $shell = shift;
|
||||
close STDERR;
|
||||
@ -123,15 +107,19 @@ sub grab_list
|
||||
$h = {};
|
||||
};
|
||||
|
||||
my @current = ();
|
||||
while(<$fh>) {
|
||||
push(@current, $_);
|
||||
chomp;
|
||||
if (m/^\=\=\=\>\s*Exiting (.*) with an error$/) {
|
||||
my $dir = DPB::PkgPath->new_hidden($1);
|
||||
$dir->{broken} = 1;
|
||||
$h->{$dir} = $dir;
|
||||
push(@errors, "Problem in ".$dir->fullpkgpath."\n");
|
||||
open my $quicklog, '>>', $logger->log_pkgpath($dir);
|
||||
print $quicklog @current;
|
||||
}
|
||||
if (m/^\=\=\=\>\s*(.*)/) {
|
||||
@current = ("$_\n");
|
||||
print $log $_, "\n";
|
||||
$core->job->set_status(" at $1");
|
||||
$subdir = DPB::PkgPath->new_hidden($1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user