Skip to content

Commit

Permalink
[backend] do not transfer isos with the kiwitree mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Oct 2, 2012
1 parent 64e63a3 commit eb6a206
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -2006,9 +2006,17 @@ sub dobuild {
}

sub buildkiwitree {
my ($destfile, @todo) = @_;
my ($destfile, @dirs) = @_;
my %tree;
@todo = map {($_, '')} @todo;
my @todo;
while (@dirs) {
my $dir = shift @dirs;
my $sdir = shift @dirs;
$sdir = '' unless defined $sdir;
next unless -d $dir;
$tree{$1} = "d ". BSRPC::urlencode($1) if $sdir =~ /^(.+)\/$/;
push @todo, $dir, $sdir;
}
while (@todo) {
my $dir = shift @todo;
my $sdir = shift @todo;
Expand Down Expand Up @@ -2446,8 +2454,8 @@ if ($ex == 0) {
my @files = sort(ls("$buildroot/.build.packages/$d"));
@files = grep {$_ ne 'same_result_marker' && $_ ne '.kiwitree'} @files;
if ($localkiwi && ! -d "$localkiwi/jobs/$buildinfo->{'arch'}" && $d eq 'KIWI') {
$kiwitree = 1 if grep {-d "$buildroot/.build.packages/$d/$_"} @files;
next if $kiwitree;
$kiwitree = [ grep {-d "$buildroot/.build.packages/$d/$_"} @files ];
undef $kiwitree unless @$kiwitree;
}
@files = grep {-f "$buildroot/.build.packages/$d/$_"} @files;
push @send, map {"$buildroot/.build.packages/$d/$_"} @files;
Expand All @@ -2457,7 +2465,7 @@ if ($ex == 0) {
my $kiwitreefile = "$buildroot/.build.packages/.kiwitree";
eval {
die(".kiwitree already exists\n") if -e $kiwitreefile;
buildkiwitree($kiwitreefile , "$buildroot/.build.packages/KIWI");
buildkiwitree($kiwitreefile, map { ("$buildroot/.build.packages/KIWI/$_", "$_/") } @$kiwitree);
push @send, { name => '.kiwitree', filename => $kiwitreefile };
};
if ($@) {
Expand Down

0 comments on commit eb6a206

Please sign in to comment.