make dpb more useful for people hacking on ports, allow them to not clean

the work directory after building.
This commit is contained in:
espie 2011-09-25 10:41:30 +00:00
parent 1521428320
commit 7fb255ef24
4 changed files with 15 additions and 9 deletions

View File

@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
# $OpenBSD: dpb,v 1.24 2011/09/13 09:46:53 espie Exp $
# $OpenBSD: dpb,v 1.25 2011/09/25 10:41:30 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -89,8 +89,8 @@ sub handle_options
},
};
$state->SUPER::handle_options('aceqrRstuUvh:xA:f:F:j:m:P:b:L:S:',
"[-acerRsuUvx] [-A arch] [-f N] [-F N][-j N] [-P plist] [-h hosts]",
$state->SUPER::handle_options('acCeqrRstuUvh:xA:f:F:j:m:P:b:L:S:',
"[-acCerRsuUvx] [-A arch] [-f N] [-F N][-j N] [-P plist] [-h hosts]",
"[-L logdir] [-b log] [-t ctimeout] [-m threshold] [path ...]");
$state->{fullrepo} = join("/", $state->{repo}, $state->arch, "all");
$state->{logdir} //= $ENV{LOGDIR} //

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: Port.pm,v 1.12 2011/07/14 11:03:35 espie Exp $
# $OpenBSD: Port.pm,v 1.13 2011/09/25 10:41:30 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -360,7 +360,9 @@ sub add_normal_tasks
if ($builder->{size}) {
push @todo, 'show-fake-size';
}
push @todo, 'clean';
if (!$builder->{dontclean}) {
push @todo, 'clean';
}
$self->add_tasks(map {DPB::Port::TaskFactory->create($_)} @todo);
}

View File

@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
# $OpenBSD: PortBuilder.pm,v 1.11 2011/06/04 12:58:24 espie Exp $
# $OpenBSD: PortBuilder.pm,v 1.12 2011/09/25 10:41:30 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@ -31,6 +31,7 @@ sub new
my $self = bless {
state => $state,
clean => $state->opt('c'),
dontclean => $state->opt('C'),
fetch => $state->opt('f'),
size => $state->opt('s'),
rebuild => $state->opt('R'),

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: dpb.1,v 1.14 2011/09/23 19:06:36 espie Exp $
.\" $OpenBSD: dpb.1,v 1.15 2011/09/25 10:41:30 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: September 23 2011 $
.Dd $Mdocdate: September 25 2011 $
.Dt DPB 1
.Os
.Sh NAME
@ -23,7 +23,7 @@
.Sh SYNOPSIS
.Nm dpb
.Bk -words
.Op Fl aceqrRsuUx
.Op Fl acCeqrRsuUx
.Op Fl A Ar arch
.Op Fl b Ar logfile
.Op Fl D Ar PARAM Ns = Ns Ar value
@ -72,6 +72,9 @@ Prime the heuristics module with a previous build log, so that packages that
take a long time to build will happen earlier.
.It Fl c
Clean port working directory and log before each build.
.It Fl C
Don't clean port working directory after build.
Warning: requires insane amounts of diskspace for a full build.
.It Fl D Ar PARAM Ns = Ns Ar value
Set defined parameter to value.
Known parameters are as follows: