add an option for dpb to keep going if there are errors left.
there's a bug in the display (to be fixed) as errors won't show properly and you have to look manually though...
This commit is contained in:
parent
00697f6d21
commit
663157b0c7
@ -1,7 +1,7 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: dpb,v 1.2 2010/08/20 15:22:21 espie Exp $
|
||||
# $OpenBSD: dpb,v 1.3 2010/10/24 10:01:57 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -43,7 +43,7 @@ use OpenBSD::Paths;
|
||||
my $make = $ENV{MAKE} || OpenBSD::Paths->make;
|
||||
|
||||
our ($opt_t, $opt_e, $opt_T, $opt_c, $opt_h, $opt_A, $opt_j, $opt_a,
|
||||
$opt_r, $opt_s, $opt_u, $opt_U,
|
||||
$opt_q, $opt_r, $opt_s, $opt_u, $opt_U,
|
||||
$opt_L, $opt_m, $opt_f, $opt_x);
|
||||
my @subdirlist;
|
||||
|
||||
@ -107,7 +107,7 @@ $ui->{opt} = {
|
||||
parse_size_file(shift, $heuristics);
|
||||
}
|
||||
};
|
||||
$ui->handle_options('acersuUh:xA:f:j:m:P:b:L:S:t:T:',
|
||||
$ui->handle_options('aceqrsuUh:xA:f:j:m:P:b:L:S:t:T:',
|
||||
"[-acersuUx] [-A arch] [-j N] [-P plist] [-h hosts] [-L logdir]",
|
||||
"[-b log] [-t ctimeout] [-T dtimeout] [-m threshold] [path ...]");
|
||||
|
||||
@ -247,15 +247,21 @@ $engine->check_buildable;
|
||||
|
||||
DPB::Core->start_clock($opt_T);
|
||||
while (1) {
|
||||
handle_non_waiting_jobs(0);
|
||||
if (!DPB::Core->running && (!$keep_going || !$engine->can_build)) {
|
||||
$engine->check_buildable;
|
||||
if (!$engine->can_build) {
|
||||
last;
|
||||
while (1) {
|
||||
handle_non_waiting_jobs(0);
|
||||
if (!DPB::Core->running &&
|
||||
(!$keep_going || !$engine->can_build)) {
|
||||
$engine->check_buildable;
|
||||
if (!$engine->can_build) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (DPB::Core->running) {
|
||||
DPB::Core->reap_wait;
|
||||
}
|
||||
}
|
||||
if (DPB::Core->running) {
|
||||
DPB::Core->reap_wait;
|
||||
if (!$opt_q || !$engine->has_errors) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# ex:ts=8 sw=4:
|
||||
# $OpenBSD: Engine.pm,v 1.4 2010/10/23 21:46:03 espie Exp $
|
||||
# $OpenBSD: Engine.pm,v 1.5 2010/10/24 10:01:57 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
#
|
||||
@ -42,6 +42,16 @@ sub new
|
||||
return $o;
|
||||
}
|
||||
|
||||
sub has_errors
|
||||
{
|
||||
my $self = shift;
|
||||
if (@{$self->{errors}} != 0) {
|
||||
$self->{locker}->recheck_errors($self);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub log_no_ts
|
||||
{
|
||||
my ($self, $kind, $v, $extra) = @_;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: dpb.1,v 1.4 2010/10/23 18:14:19 espie Exp $
|
||||
.\" $OpenBSD: dpb.1,v 1.5 2010/10/24 10:01:57 espie Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 23 2010 $
|
||||
.Dd $Mdocdate: October 24 2010 $
|
||||
.Dt DPB 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -23,7 +23,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm dpb
|
||||
.Bk -words
|
||||
.Op Fl acersuUx
|
||||
.Op Fl aceqrsuUx
|
||||
.Op Fl A Ar arch
|
||||
.Op Fl b Ar logfile
|
||||
.Op Fl h Ar hosts
|
||||
@ -116,6 +116,8 @@ Avoid for now, as mfs has serious race conditions which yield
|
||||
random errors under stress conditions such as bulk build.
|
||||
.It Fl P Ar subdirlist
|
||||
Read list of pkgpaths from file
|
||||
.It Fl q
|
||||
Don't quit while errors/locks are around.
|
||||
.It Fl r
|
||||
Random build order.
|
||||
Disregard any kind of smart heuristics.
|
||||
|
Loading…
Reference in New Issue
Block a user