whitespace
This commit is contained in:
parent
609e100ea7
commit
56177f75ea
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
@ -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'));
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
@ -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;
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
@ -103,7 +103,7 @@ sub finalize
|
||||
{
|
||||
}
|
||||
|
||||
sub watched
|
||||
sub watched
|
||||
{
|
||||
my $self = shift;
|
||||
return $self->{status};
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
@ -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";
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
@ -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 <espie@openbsd.org>
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user