Skip to content

Commit

Permalink
[backend] Backport from master d650672 to fix issue#1608
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten Keil committed Apr 6, 2016
1 parent 110a65a commit 8066c88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/backend/bs_repserver
Original file line number Diff line number Diff line change
Expand Up @@ -2050,14 +2050,15 @@ sub copybuild {
mkdir_p($dir);
my $delayed_linking;
my $needsign;
for my $bin (grep {$_ ne 'status' && $_ ne 'reason' && $_ ne 'history' && !/^\./} ls($odir)) {
for my $bin (grep {$_ ne 'status' && $_ ne 'reason' && $_ ne 'history' && $_ ne 'meta' && !/^\./} sort(ls($odir))) {
if ($bin eq "updateinfo.xml" && $cgi->{'setupdateinfoid'}) {
my $updateinfo = readxml("$odir/$bin", $BSXML::updateinfo);
for (@{$updateinfo->{'update'} || []}) {
$_->{'id'} = $cgi->{'setupdateinfoid'};
}
writexml("$dir/$bin", undef, $updateinfo, $BSXML::updateinfo);
} else {
next if $bin =~ /^::import::/; # can't copy those yet
$needsign = 1 if $bin =~ /\.(?:d?rpm|sha256|iso)$/;
my $nbin = $bin;
my $setrelease = $cgi->{'setrelease'};
Expand All @@ -2079,6 +2080,7 @@ sub copybuild {
}
}
}
link("$odir/.meta.success", "$dir/meta") if -e "$odir/.meta.success";

# we run the linking of directory trees in background, since it can take a long time
# for simple files it happened already
Expand Down
5 changes: 4 additions & 1 deletion src/backend/bs_sched
Original file line number Diff line number Diff line change
Expand Up @@ -4538,12 +4538,15 @@ sub uploadbuildevent {
my $gdst = "$reporoot/$prp/$myarch";
my $dst = "$gdst/$packid";
mkdir_p($dst);
my $meta;
$meta = "$jobdatadir/meta" if -e "$jobdatadir/meta";
print " - $prp: $packid uploaded\n";
my $useforbuildenabled = 1;
$useforbuildenabled = enabled($repoid, $projpacks->{$projid}->{'useforbuild'}, $useforbuildenabled);
$useforbuildenabled = enabled($repoid, $pdata->{'useforbuild'}, $useforbuildenabled);
update_dst_full($prp, $packid, $jobdatadir, undef, $useforbuildenabled, $prpsearchpath{$prp});
update_dst_full($prp, $packid, $jobdatadir, $meta, $useforbuildenabled, $prpsearchpath{$prp});
$changed->{$prp} = 2 if $useforbuildenabled;
rename($meta, "$gdst/:meta/$packid") if $meta;
delete $repounchanged{$prp} if $useforbuildenabled;
$repounchanged{$prp} = 2 if $repounchanged{$prp};
$changed->{$prp} ||= 1;
Expand Down

0 comments on commit 8066c88

Please sign in to comment.