Skip to content

Commit

Permalink
[backend] remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Jan 11, 2016
1 parent c27982f commit fb56164
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion src/backend/BSSched/Access.pm
Expand Up @@ -82,7 +82,7 @@ sub checkroles {
# XXX: check type and roles
for my $r (@oroles) {
next if $r->{'role'} eq 'bugowner';
my @rx;
my @rx;
if (exists $r->{'userid'}) {
push @rx, grep {exists($_->{'userid'}) && $_->{'userid'} eq $r->{'userid'}} @roles;
} elsif (exists $r->{'groupid'}) {
Expand Down
40 changes: 20 additions & 20 deletions src/backend/BSSched/BuildJob.pm
Expand Up @@ -91,7 +91,7 @@ use Build;
use BSRPC;
use BSCando;

=head1 NAME
=head1 NAME
BSSched::BuildJob
Expand All @@ -101,7 +101,7 @@ BSSched::BuildJob
=head1 DESCRIPTION
This library contains functions to handle jobs in openbuild-service
This library contains functions to handle jobs in openbuild-service
=cut

Expand Down Expand Up @@ -214,14 +214,14 @@ sub killscheduled {
}


=head2 killbuilding - kill build jobs
=head2 killbuilding - kill build jobs
used if a project/package got deleted to kill all running jobs
input: $prp - prp we are working on
$packid - just kill the builds of the package
=cut

sub killbuilding {
my ($gctx, $prp, $packid) = @_;

Expand Down Expand Up @@ -641,7 +641,7 @@ sub fakejobfinished_nouseforbuild {
patch the packstatus entry of package $packid so that it reflects the finished state
and does not revert back to scheduled
=cut
=cut

sub patchpackstatus {
my ($gctx, $prp, $packid, $code) = @_;
Expand Down Expand Up @@ -964,7 +964,7 @@ sub path2buildinfopath {

sub metacheck {
my ($ctx, $packid, $buildtype, $new_meta, $data) = @_;

my $gctx = $ctx->{'gctx'};
my $prp = $ctx->{'prp'};
my $gdst = $ctx->{'gdst'};
Expand Down Expand Up @@ -1000,7 +1000,7 @@ sub metacheck {
#print " nothing changed\n";
return ('done');
}
my $repo = $ctx->{'repo'};
my $repo = $ctx->{'repo'};
if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product') {
my $rebuildmethod = $repo->{'rebuild'} || 'transitive';
if ($rebuildmethod eq 'local') {
Expand All @@ -1026,9 +1026,9 @@ sub sortedmd5toreason {
my @res;
for my $line (@_) {
my $tag = substr($line, 0, 1); # just the first char
$tag = 'md5sum' if $tag eq '!';
$tag = 'added' if $tag eq '+';
$tag = 'removed' if $tag eq '-';
$tag = 'md5sum' if $tag eq '!';
$tag = 'added' if $tag eq '+';
$tag = 'removed' if $tag eq '-';
push @res, { 'change' => $tag, 'key' => substr($line, 1) };
}
return \@res;
Expand All @@ -1047,25 +1047,25 @@ sub diffsortedmd5 {
my @from = map {[$_, substr($_, 34)]} @$fromp;
my @to = map {[$_, substr($_, 34)]} @$top;
@from = sort {$a->[1] cmp $b->[1] || $a->[0] cmp $b->[0]} @from;
@to = sort {$a->[1] cmp $b->[1] || $a->[0] cmp $b->[0]} @to;
@to = sort {$a->[1] cmp $b->[1] || $a->[0] cmp $b->[0]} @to;

for my $f (@from) {
if (@to && $f->[1] eq $to[0]->[1]) {
push @ret, "!$f->[1]" if $f->[0] ne $to[0]->[0];
shift @to;
next;
}
shift @to;
next;
}
if (!@to || $f->[1] lt $to[0]->[1]) {
push @ret, "-$f->[1]";
next;
}
next;
}
while (@to && $f->[1] gt $to[0]->[1]) {
push @ret, "+$to[0]->[1]";
shift @to;
}
redo;
shift @to;
}
redo;
}
push @ret, "+$_->[1]" for @to;
push @ret, "+$_->[1]" for @to;
return @ret;
}

Expand Down
6 changes: 3 additions & 3 deletions src/backend/BSSched/BuildJob/Aggregate.pm
Expand Up @@ -72,7 +72,7 @@ sub new {
=cut

sub expand {
return 1, splice(@_, 3);
return 1, splice(@_, 3);
}

=head2 check - check if an aggregate needs to be rebuilt
Expand Down Expand Up @@ -408,10 +408,10 @@ sub bins2repo {
next unless $data;
eval {
BSVerify::verify_nevraquery($data);
};
};
next if $@;
delete $data->{'disttag'};
$data->{'id'} = $id;
$data->{'id'} = $id;
$repobins->{$bin} = $data;
}
return $repobins;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/BSSched/BuildJob/Channel.pm
Expand Up @@ -57,7 +57,7 @@ sub new {
=cut

sub expand {
return 1, splice(@_, 3);
return 1, splice(@_, 3);
}

=head2 check - check if a patchinfo needs to be rebuilt
Expand Down
6 changes: 3 additions & 3 deletions src/backend/BSSched/BuildJob/KiwiImage.pm
Expand Up @@ -157,7 +157,7 @@ sub check {
$nrs{$aprp} = {};
}
}

my @blocked;
for my $n (sort @edeps) {
my $p = $dep2pkg{$n};
Expand Down Expand Up @@ -247,10 +247,10 @@ sub expandkiwipath {
my @path;
for (@{$info->{'path'} || []}) {
if ($_->{'project'} eq '_obsrepositories') {
push @path, @{$prpsearchpath || []};
push @path, @{$prpsearchpath || []};
} else {
push @path, "$_->{'project'}/$_->{'repository'}";
}
}
}
return @path;
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/BSSched/BuildJob/Package.pm
Expand Up @@ -219,7 +219,7 @@ sub check {
$dep2meta->{$bpack} = join("\n", @m);
# do not include our own build results
next if $m[0] =~ /\/\Q$packid\E$/s;
# fixup first line
# fixup first line
$m[0] =~ s/ .*/ $bpack/;
push @new_meta, @m;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/backend/BSSched/BuildJob/Patchinfo.pm
Expand Up @@ -59,7 +59,7 @@ sub new {
=cut

sub expand {
return 1, splice(@_, 3);
return 1, splice(@_, 3);
}

=head2 check - check if a patchinfo needs to be rebuilt
Expand Down
28 changes: 14 additions & 14 deletions src/backend/BSSched/BuildResult.pm
Expand Up @@ -64,39 +64,39 @@ our $new_full_handling = 1;
$new_full_handling = $BSConfig::new_full_handling if defined $BSConfig::new_full_handling;

my %default_exportfilters = (
'i586' => {
'i586' => {
'\.x86_64\.rpm$' => [ 'x86_64' ],
'\.ia64\.rpm$' => [ 'ia64' ],
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
},
'x86_64' => {
'x86_64' => {
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
},
'ppc' => {
'ppc' => {
'\.ppc64\.rpm$' => [ 'ppc64' ],
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
},
'ppc64' => {
'ppc64' => {
'\.ppc\.rpm$' => [ 'ppc' ],
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
},
'sparc' => {
'sparc' => {
# discard is intended - sparcv9 target is better suited for 64-bit baselibs
'\.sparc64\.rpm$' => [],
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
},
'sparcv8' => {
'sparcv8' => {
# discard is intended - sparcv9 target is better suited for 64-bit baselibs
'\.sparc64\.rpm$' => [],
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
},
'sparcv9' => {
'sparcv9' => {
'\.sparc64\.rpm$' => [ 'sparc64' ],
'-debuginfo-.*\.rpm$' => [],
'-debugsource-.*\.rpm$' => [],
Expand Down Expand Up @@ -581,7 +581,7 @@ sub read_bininfo {
alien: gbininfo is from another scheduler
=cut
=cut

sub read_gbininfo {
my ($dir, $alien, $dontmerge) = @_;
Expand Down Expand Up @@ -634,13 +634,13 @@ sub read_gbininfo {
=cut

sub findmeta {
my ($gdst, $packid, $r, $zerook) = @_;
my ($gdst, $packid, $r, $zerook) = @_;
if ($r->{'imported'}) {
my $fn = $r->{'filename'};
if ($fn =~ s/^::import::/.meta.success.import./s) {
$fn =~ s/::.*//;
return "$gdst/$packid/$fn" if -s "$gdst/$packid/$fn";
}
}
} else {
return "$gdst/$packid/.meta.success" if -s "$gdst/$packid/.meta.success";
}
Expand All @@ -659,7 +659,7 @@ sub findmeta {
=cut

sub remove_from_volatile {
my ($gdst, $del) = @_;
my ($gdst, $del) = @_;
for my $r (@$del) {
my $bin = $r->{'filename'};
next unless $bin =~ /^(.*)\.($binsufsre)$/; # hmm?
Expand All @@ -668,7 +668,7 @@ sub remove_from_volatile {
unlink("$gdst/_volatile/$bin");
}
unlink("$gdst/_volatile/.bininfo");
my $bininfo = read_bininfo("$gdst/_volatile", 1);
my $bininfo = read_bininfo("$gdst/_volatile", 1);
update_bininfo_merge($gdst, '_volatile', $bininfo);
}

Expand All @@ -688,7 +688,7 @@ sub wipe {
# delete full entries
my $projpacks = $gctx->{'projpacks'};
my $proj = $projpacks->{$projid};
my $pdata = (($proj || {})->{'package'} || {})->{$packid} || {};
my $pdata = (($proj || {})->{'package'} || {})->{$packid} || {};
my $useforbuildenabled = 1;
$useforbuildenabled = BSUtil::enabled($repoid, $proj->{'useforbuild'}, $useforbuildenabled, $myarch) if $proj;
$useforbuildenabled = BSUtil::enabled($repoid, $pdata->{'useforbuild'}, $useforbuildenabled, $myarch);
Expand All @@ -707,7 +707,7 @@ sub wipe {
rmdir("$gdst/$packid/$f");
} else {
unlink("$gdst/$packid/$f");
}
}
}
rmdir("$gdst/$packid"); # in case there is no history
}
Expand Down
24 changes: 12 additions & 12 deletions src/backend/BSSched/Checker.pm
Expand Up @@ -41,7 +41,7 @@ use BSSched::BuildJob::SimpleImage;
use BSSched::BuildJob::Unknown;


=head1 NAME
=head1 NAME
BSSched::Checker
Expand Down Expand Up @@ -121,7 +121,7 @@ sub wipe {
unlink("$gdst/$dir") || die("$gdst/$dir: $!\n");
}
}
$gctx->{'changed_med'}->{$prp} = 2;
$gctx->{'changed_med'}->{$prp} = 2;
BSSched::Events::sendrepochangeevent($ctx->{'gctx'}, $prp);
BSSched::BuildJob::killbuilding($ctx->{'gctx'}, $prp);
BSSched::PublishRepo::prpfinished($ctx);
Expand All @@ -139,7 +139,7 @@ sub wipe {
my $others;
for (ls("$reporoot/$prp")) {
next unless -d $_;
$others = 1;
$others = 1;
}
if (!$others) {
# cannot delete repoinfo because it may contain splitdbg data
Expand Down Expand Up @@ -418,7 +418,7 @@ sub expandandsort {
}
$pkg2buildtype{$packid} = $buildtype;
$havepatchinfos{$packid} = 1 if $buildtype eq 'patchinfo';

if (!$info || !defined($info->{'file'}) || !defined($info->{'name'})) {
if ($pdata->{'error'} && $pdata->{'error'} eq 'disabled') {
$pkgdisabled{$packid} = 1;
Expand Down Expand Up @@ -529,16 +529,16 @@ sub calcrelsynctrigger {
next unless $relsync->{$packid};
next unless $relsync->{$packid} =~ /(.*)\.(\d+)$/;
next unless defined($relsyncmax->{"$tag/$1"}) && $2 < $relsyncmax->{"$tag/$1"};
$relsynctrigger{$packid} = 1;
$relsynctrigger{$packid} = 1;
}
}
}
if (%relsynctrigger) {
# filter failed packages
for (ls("$gdst/:logfiles.fail")) {
delete $relsynctrigger{$_};
}
}
}
}
}
$ctx->{'relsynctrigger'} = \%relsynctrigger;
$ctx->{'relsyncmax'} = $relsyncmax;
}
Expand Down Expand Up @@ -603,7 +603,7 @@ sub checkpkgs {
for my $packid (keys %{$oldpackstatus->{'packstatus'}}) {
next if $pdatas->{$packid};
$packstatus{$packid} = $oldpackstatus->{'packstatus'}->{$packid};
$packerror{$packid} = $oldpackstatus->{'packerror'}->{$packid} if $oldpackstatus->{'packerror'}->{$packid};
$packerror{$packid} = $oldpackstatus->{'packerror'}->{$packid} if $oldpackstatus->{'packerror'}->{$packid};
}
}

Expand Down Expand Up @@ -829,7 +829,7 @@ sub checkpkgs {
BSUtil::store("$gdst/.:packstatus", "$gdst/:packstatus", {
'packstatus' => \%packstatus,
'packerror' => \%packerror,
});
});
unlink("$gdst/:packstatus.finished");
my $schedulerstate;
if (keys %building) {
Expand All @@ -838,13 +838,13 @@ sub checkpkgs {
$schedulerstate = 'blocked';
} else {
$schedulerstate = 'finished';
}
}
return ($schedulerstate, undef);
}

sub printstats {
my ($ctx) = @_;

my $packstatus = $ctx->{'packstatus'};
for my $status (sort keys %{{map {$_ => 1} values %$packstatus}}) {
print " $status: ".scalar(grep {$_ eq $status} values %$packstatus)."\n";
Expand Down

0 comments on commit fb56164

Please sign in to comment.