From 56177f75ea5e48e793510780f63b5f1b6cf58e87 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 4 May 2010 09:45:41 +0000 Subject: [PATCH] whitespace --- infrastructure/build/DPB/Core.pm | 10 ++++----- infrastructure/build/DPB/Core/Distant.pm | 16 +++++++-------- infrastructure/build/DPB/Engine.pm | 26 ++++++++++++------------ infrastructure/build/DPB/Grabber.pm | 2 +- infrastructure/build/DPB/Heuristics.pm | 8 ++++---- infrastructure/build/DPB/Job.pm | 4 ++-- infrastructure/build/DPB/Locks.pm | 2 +- infrastructure/build/DPB/Logger.pm | 2 +- infrastructure/build/DPB/PkgPath.pm | 2 +- infrastructure/build/DPB/PortBuilder.pm | 8 ++++---- infrastructure/build/DPB/PortInfo.pm | 2 +- infrastructure/build/DPB/Reporter.pm | 2 +- infrastructure/build/DPB/Signature.pm | 2 +- infrastructure/build/DPB/Util.pm | 2 +- infrastructure/build/DPB/Vars.pm | 2 +- infrastructure/build/dpb3 | 2 +- 16 files changed, 46 insertions(+), 46 deletions(-) diff --git a/infrastructure/build/DPB/Core.pm b/infrastructure/build/DPB/Core.pm index 7c2fbf73c19..962de8f3128 100644 --- a/infrastructure/build/DPB/Core.pm +++ b/infrastructure/build/DPB/Core.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Core.pm,v 1.11 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Core.pm,v 1.12 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -438,7 +438,7 @@ sub one_core $core->job->watched($time); } -sub report +sub report { my $current = time(); @@ -591,16 +591,16 @@ sub hostname } return $host; } - + package DPB::Core::Clock; our @ISA = qw(DPB::Core::Special); sub start -{ +{ my ($class, $timeout) = @_; my $core = $class->new('localhost'); $timeout //= 10; - $core->start_job(DPB::Job::Infinite->new(DPB::Task::Fork->new(sub { + $core->start_job(DPB::Job::Infinite->new(DPB::Task::Fork->new(sub { sleep($timeout); exit(0); }), 'clock')); diff --git a/infrastructure/build/DPB/Core/Distant.pm b/infrastructure/build/DPB/Core/Distant.pm index 7de89917150..c8e4d5ef9e6 100644 --- a/infrastructure/build/DPB/Core/Distant.pm +++ b/infrastructure/build/DPB/Core/Distant.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Distant.pm,v 1.7 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Distant.pm,v 1.8 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -24,8 +24,8 @@ package DPB::Ssh; sub ssh { my ($class, $socket, $timeout) = @_; - return ('ssh', '-o', "connectTimeout=$timeout", - '-o', "serverAliveInterval=$timeout", + return ('ssh', '-o', "connectTimeout=$timeout", + '-o', "serverAliveInterval=$timeout", '-S', $socket); } @@ -61,8 +61,8 @@ sub hostname sub run { my ($self, $cmd) = @_; - exec {OpenBSD::Paths->ssh} - ($self->ssh($self->socket, $self->timeout), + exec {OpenBSD::Paths->ssh} + ($self->ssh($self->socket, $self->timeout), $self->hostname, $cmd); } @@ -84,8 +84,8 @@ sub run close STDERR; open STDOUT, '>/dev/null'; open STDERR, '>&STDOUT'; - exec {OpenBSD::Paths->ssh} - (DPB::Ssh->ssh($socket, $timeout), + exec {OpenBSD::Paths->ssh} + (DPB::Ssh->ssh($socket, $timeout), '-N', '-M', $host); exit(1); } @@ -112,7 +112,7 @@ sub new $TMPDIR //= $ENV{PKG_TMPDIR} || '/var/tmp'; my $timeout = 60; my $socket = "$TMPDIR/ssh-$host-$$"; - my $o = $class->SUPER::new(DPB::Task::SshMaster->new($socket, + my $o = $class->SUPER::new(DPB::Task::SshMaster->new($socket, $timeout, $host), "ssh master for $host"); $o->{host} = $host; $o->{timeout} = $timeout; diff --git a/infrastructure/build/DPB/Engine.pm b/infrastructure/build/DPB/Engine.pm index 1fa245782d3..9709178cb52 100644 --- a/infrastructure/build/DPB/Engine.pm +++ b/infrastructure/build/DPB/Engine.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Engine.pm,v 1.7 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Engine.pm,v 1.8 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -26,10 +26,10 @@ use DPB::Util; sub new { my ($class, $builder, $heuristics, $logger, $locker) = @_; - my $o = bless {built => {}, tobuild => {}, + my $o = bless {built => {}, tobuild => {}, buildable => $heuristics->new_queue, later => {}, building => {}, - installable => {}, builder => $builder, + installable => {}, builder => $builder, packages => {}, all => {}, heuristics => $heuristics, @@ -88,7 +88,7 @@ sub errors_string sub report { my $self = shift; - return join(" ", + return join(" ", "P=".$self->count("packages"), "I=".$self->count("installable"), "B=".$self->count("built"), @@ -103,7 +103,7 @@ sub stats my $self = shift; my $fh = $self->{stats}; $self->{statline} //= ""; - my $line = join(" ", + my $line = join(" ", "P=".$self->count("packages"), "I=".$self->count("installable"), "B=".$self->count("built"), @@ -170,8 +170,8 @@ sub adjust my $not_yet = 0; for my $d (values %{$v->{info}{$kind}}) { $self->{heuristics}->mark_depend($d, $v); - if ($self->{installable}{$d} || - (defined $d->{info} && + if ($self->{installable}{$d} || + (defined $d->{info} && $d->fullpkgname eq $v->fullpkgname)) { delete $v->{info}{$kind}{$d}; } else { @@ -191,7 +191,7 @@ sub adjust_extra for my $d (values %{$v->{info}{$kind}}) { $self->{heuristics}->mark_depend($d, $v); if ((defined $d->{info} && !$self->{tobuild}{$d}) || - (defined $d->fullpkgname && + (defined $d->fullpkgname && $d->fullpkgname eq $v->fullpkgname)) { delete $v->{info}{$kind}{$d}; } else { @@ -276,7 +276,7 @@ sub check_buildable $self->log_no_ts('Q', $v); delete $self->{tobuild}{$v}; $changes++; - } + } } } while ($changes); $self->stats; @@ -407,7 +407,7 @@ sub start_new_job } else { push(@{$self->{errors}}, $v); $self->log('L', $v); - } + } } $core->mark_ready; } @@ -415,7 +415,7 @@ sub start_new_job sub can_build { my $self = shift; - + return $self->{buildable}->non_empty || @{$self->{requeued}} > 0; } @@ -426,9 +426,9 @@ sub dump_category $k =~ m/^./; my $q = "\u$&: "; - for my $v (sort {$a->fullpkgpath cmp $b->fullpkgpath} + for my $v (sort {$a->fullpkgpath cmp $b->fullpkgpath} values %{$self->{$k}}) { - print $fh $q; + print $fh $q; $v->quick_dump($fh); } } diff --git a/infrastructure/build/DPB/Grabber.pm b/infrastructure/build/DPB/Grabber.pm index ade6dc2d4f1..31b8796460a 100644 --- a/infrastructure/build/DPB/Grabber.pm +++ b/infrastructure/build/DPB/Grabber.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Grabber.pm,v 1.3 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Grabber.pm,v 1.4 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/Heuristics.pm b/infrastructure/build/DPB/Heuristics.pm index 4fa5b508673..8af6f6073a6 100644 --- a/infrastructure/build/DPB/Heuristics.pm +++ b/infrastructure/build/DPB/Heuristics.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Heuristics.pm,v 1.5 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Heuristics.pm,v 1.6 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -22,7 +22,7 @@ use warnings; # consequences package DPB::Heuristics; -# for now, we don't create a separate object, we assume everything here is +# for now, we don't create a separate object, we assume everything here is # "global" my (%weight, %bad_weight, %wrkdir, %needed_by); @@ -241,7 +241,7 @@ sub report $sum_sf += $sf; } - return scalar(keys %$todo)." ".$total*$max_sf." $sum_sf\n".DPB::Util->time2string($time)." -> ". + return scalar(keys %$todo)." ".$total*$max_sf." $sum_sf\n".DPB::Util->time2string($time)." -> ". DPB::Util->time2string($time+$total*$max_sf*$max_sf/$sum_sf)." [$$]\n"; } @@ -400,7 +400,7 @@ sub sorted if ($core->sf > $all->[-1] - 1) { return $self->SUPER::sorted($core); } else { - return DPB::Heuristics::Sorter->new($self->bin_part($core->sf, + return DPB::Heuristics::Sorter->new($self->bin_part($core->sf, $all)); } } diff --git a/infrastructure/build/DPB/Job.pm b/infrastructure/build/DPB/Job.pm index 3eb57d00276..bf6b062bf94 100644 --- a/infrastructure/build/DPB/Job.pm +++ b/infrastructure/build/DPB/Job.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Job.pm,v 1.6 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Job.pm,v 1.7 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -103,7 +103,7 @@ sub finalize { } -sub watched +sub watched { my $self = shift; return $self->{status}; diff --git a/infrastructure/build/DPB/Locks.pm b/infrastructure/build/DPB/Locks.pm index 1a9deb8a173..e4097277b90 100644 --- a/infrastructure/build/DPB/Locks.pm +++ b/infrastructure/build/DPB/Locks.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Locks.pm,v 1.3 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Locks.pm,v 1.4 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/Logger.pm b/infrastructure/build/DPB/Logger.pm index ef24ca1f6cd..fff7a2ae3ff 100644 --- a/infrastructure/build/DPB/Logger.pm +++ b/infrastructure/build/DPB/Logger.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Logger.pm,v 1.2 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Logger.pm,v 1.3 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/PkgPath.pm b/infrastructure/build/DPB/PkgPath.pm index 7a49d795eaf..02cd3ba0dcc 100644 --- a/infrastructure/build/DPB/PkgPath.pm +++ b/infrastructure/build/DPB/PkgPath.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PkgPath.pm,v 1.1 2010/02/24 11:33:31 espie Exp $ +# $OpenBSD: PkgPath.pm,v 1.2 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/PortBuilder.pm b/infrastructure/build/DPB/PortBuilder.pm index 800ce8eed6d..7bd485ed91f 100644 --- a/infrastructure/build/DPB/PortBuilder.pm +++ b/infrastructure/build/DPB/PortBuilder.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PortBuilder.pm,v 1.6 2010/04/15 09:59:07 espie Exp $ +# $OpenBSD: PortBuilder.pm,v 1.7 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -28,10 +28,10 @@ use DPB::Job::Port; sub new { my $class = shift; - my ($opt_c, $opt_s, $opt_u, $opt_U, $fullrepo, $logger, $ports, $make, + my ($opt_c, $opt_s, $opt_u, $opt_U, $fullrepo, $logger, $ports, $make, $h) = @_; my $self = bless {clean => $opt_c, size => $opt_s, - fullrepo => $fullrepo, + fullrepo => $fullrepo, logger => $logger, ports => $ports, make => $make, heuristics => $h}, $class; if ($opt_u || $opt_U) { @@ -68,7 +68,7 @@ sub report if (defined $job->{offset}) { $sz -= $job->{offset}; } - print $log "$pkgpath $host ", $job->totaltime, " ", $sz, " ", + print $log "$pkgpath $host ", $job->totaltime, " ", $sz, " ", $job->timings; if ($self->check($v)) { print $log "\n"; diff --git a/infrastructure/build/DPB/PortInfo.pm b/infrastructure/build/DPB/PortInfo.pm index b09b712013d..52d36786adc 100644 --- a/infrastructure/build/DPB/PortInfo.pm +++ b/infrastructure/build/DPB/PortInfo.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PortInfo.pm,v 1.2 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: PortInfo.pm,v 1.3 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/Reporter.pm b/infrastructure/build/DPB/Reporter.pm index 9c3ab5dba3e..321d37bc6cb 100644 --- a/infrastructure/build/DPB/Reporter.pm +++ b/infrastructure/build/DPB/Reporter.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Reporter.pm,v 1.12 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Reporter.pm,v 1.13 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/Signature.pm b/infrastructure/build/DPB/Signature.pm index 9fe6a540ece..fb3ecb400eb 100644 --- a/infrastructure/build/DPB/Signature.pm +++ b/infrastructure/build/DPB/Signature.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Signature.pm,v 1.6 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Signature.pm,v 1.7 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/Util.pm b/infrastructure/build/DPB/Util.pm index 9c7e7626814..ab2cc9a41fb 100644 --- a/infrastructure/build/DPB/Util.pm +++ b/infrastructure/build/DPB/Util.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Util.pm,v 1.2 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Util.pm,v 1.3 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/DPB/Vars.pm b/infrastructure/build/DPB/Vars.pm index fe023d90690..9183ccb2d52 100644 --- a/infrastructure/build/DPB/Vars.pm +++ b/infrastructure/build/DPB/Vars.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Vars.pm,v 1.2 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: Vars.pm,v 1.3 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie # diff --git a/infrastructure/build/dpb3 b/infrastructure/build/dpb3 index c0d4df0312a..447d5746b54 100755 --- a/infrastructure/build/dpb3 +++ b/infrastructure/build/dpb3 @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: dpb3,v 1.13 2010/04/26 08:32:53 espie Exp $ +# $OpenBSD: dpb3,v 1.14 2010/05/04 09:45:41 espie Exp $ # # Copyright (c) 2010 Marc Espie #