From 3ec5148eaa4b68df7167daba46457710ee835c88 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 21 Jan 2013 14:56:29 +0000 Subject: [PATCH] rollinglog must be reopened each time, comment why (commented snippet that shows how to prime -s heuristics based on time dangerous but useful) --- infrastructure/lib/DPB/Job/Port.pm | 16 +++++++++++++--- infrastructure/lib/DPB/PortBuilder.pm | 4 +--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/infrastructure/lib/DPB/Job/Port.pm b/infrastructure/lib/DPB/Job/Port.pm index 5a2bc2d61e2..3d76c5e77ff 100644 --- a/infrastructure/lib/DPB/Job/Port.pm +++ b/infrastructure/lib/DPB/Job/Port.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Port.pm,v 1.89 2013/01/21 12:29:52 espie Exp $ +# $OpenBSD: Port.pm,v 1.90 2013/01/21 14:56:29 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -542,8 +542,13 @@ sub finalize my $job = $core->job; print {$job->{builder}{logsize}} $job->{path}, " $job->{wrkdir} $sz\n"; - print {$job->{builder}{rollinglog}} - $job->{path}, " $job->{wrkdir} $sz\n"; + # XXX the rolling log might be shared with other dpb + # so it can be rewritten and sorted + # don't keep a handle on it, so that we always + # append new information to the correct filename + open(my $fh2, '>>', $job->{builder}{state}{size_log}); + print $fh2 $job->{path}, " $job->{wrkdir} $sz\n"; + last; } } close($fh); @@ -812,6 +817,11 @@ sub add_normal_tasks $times->{$self->{v}} < $hostprop->{small_timeout}) { $small = 1; } +# if (defined $times->{$self->{v}} && +# $times->{$self->{v}} < 4800) { +# $self->{special} = 1; +# print {$self->{logfh}} "Building in RAM\n"; +# } if ($builder->{clean}) { $self->insert_tasks(DPB::Task::Port::BaseClean->new('clean')); } diff --git a/infrastructure/lib/DPB/PortBuilder.pm b/infrastructure/lib/DPB/PortBuilder.pm index b36e75d74e9..ca8d0263979 100644 --- a/infrastructure/lib/DPB/PortBuilder.pm +++ b/infrastructure/lib/DPB/PortBuilder.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PortBuilder.pm,v 1.34 2013/01/21 12:29:52 espie Exp $ +# $OpenBSD: PortBuilder.pm,v 1.35 2013/01/21 14:56:29 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -98,8 +98,6 @@ sub init if ($self->{size}) { $self->{logsize} = DPB::Util->make_hot($self->logger->open("size")); - open($self->{rollinglog}, '>>', $self->{state}{size_log}); - DPB::Util->make_hot($self->{rollinglog}); } if ($self->{state}->defines("WRAP_MAKE")) { $self->{rsslog} = $self->logger->logfile("rss");