From 0a438fe13848624436d8d002189923b2c9c926b1 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 21 Jan 2013 14:50:30 +0000 Subject: [PATCH] prompted by jasper: reintroduce -S, but as a rw option, to override the rolling journal location for size log. make it possible to share dpb -s output from a given architecture with similar architectures --- infrastructure/bin/dpb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/infrastructure/bin/dpb b/infrastructure/bin/dpb index 75107b1eb77..1579aa71c60 100755 --- a/infrastructure/bin/dpb +++ b/infrastructure/bin/dpb @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: dpb,v 1.76 2013/01/21 12:03:32 espie Exp $ +# $OpenBSD: dpb,v 1.77 2013/01/21 14:50:30 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -175,7 +175,7 @@ sub handle_options }, }; - $state->SUPER::handle_options('acemqrRsuUvh:xX:A:C:f:F:I:j:J:M:p:P:b:l:L:', + $state->SUPER::handle_options('acemqrRsuUvh:S:xX:A:C:f:F:I:j:J:M:p:P:b:l:L:', "[-acemrRsuUvx] [-A arch] [-C plist] [-f N] [-F N] [-I plist] [-J p] [-j N]", "[-p parallel] [-P plist] [-h hosts] [-L logdir] [-l lockdir] [-b log]", "[-M threshold] [-X plist] [path ...]"); @@ -235,8 +235,14 @@ sub handle_options $f = $state->expand_path($f); } } + if ($state->opt('S')) { + $state->{size_log} = $state->opt('S'); + } else { + $state->{size_log} = "%f/build-stats/%a-size"; + } + $state->{permanent_log} = $state->{build_files}[-1]; - $state->{size_log} = $state->expand_path("%f/build-stats/%a-size"); + $state->{size_log} = $state->expand_path($state->{size_log}); $state->parse_size_file; $state->{logger} = DPB::Logger->new($state->logdir, $state->opt('c'));