Skip to content

Commit

Permalink
[backend] do not build a preloadimage with itself
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Jun 26, 2012
1 parent 2a0f9aa commit 04f7e75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/bs_worker
Expand Up @@ -1393,6 +1393,8 @@ sub getpreinstallimage {
next if @{$img->{'hdrids'} || []} < $bestimgn;
next unless $img->{'sizek'};
next if grep {!$neededhdrmd5s{$_}} @{$img->{'hdrids'} || []};
# ignore our own image
next if $img->{'prpa'} eq "$projid/$repoid/$buildinfo->{'arch'}" && $img->{'package'} eq $buildinfo->{'package'};
$bestimg = $img;
}
last unless $bestimg; # nothing fits
Expand Down Expand Up @@ -1765,7 +1767,7 @@ sub dobuild {
push @meta, getsources($buildinfo, $srcdir);
importbuild() unless defined &Build::queryhdrmd5;
if (!$kiwimode && $Build::Features::preinstallimage && -s "$srcdir/$buildinfo->{'file'}") {
# check if we may use a preloadimage
# check if we may use a preinstallimage
local *F;
my $needbins;
if (open(F, '<', "$srcdir/$buildinfo->{'file'}")) {
Expand Down

0 comments on commit 04f7e75

Please sign in to comment.