Skip to content

Commit

Permalink
[backend] findfile: do service file mapping before checking for speci…
Browse files Browse the repository at this point in the history
…fic files

Found by e9925248, thanks!
  • Loading branch information
mlschroe committed Jul 10, 2014
1 parent ded820b commit 7311ed9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/backend/bs_srcserver
Original file line number Diff line number Diff line change
Expand Up @@ -2608,13 +2608,6 @@ sub findfile {
# create filename -> return value hash
my %files = map {$_ => [$files->{$_}, $_]} keys %$files;

return @{$files{'_preinstallimage'}} if $ext ne 'kiwi' && keys(%files) == 1 && $files{'_preinstallimage'};

if ($ext eq 'arch') {
return @{$files{'PKGBUILD'}} if $files{'PKGBUILD'};
return (undef, undef);
}

# map services files to their real name
if ($files{'_service'}) {
for (sort keys %files) {
Expand All @@ -2625,6 +2618,13 @@ sub findfile {
}
}

return @{$files{'_preinstallimage'}} if $ext ne 'kiwi' && keys(%files) == 1 && $files{'_preinstallimage'};

if ($ext eq 'arch') {
return @{$files{'PKGBUILD'}} if $files{'PKGBUILD'};
return (undef, undef);
}

my $packid = $rev->{'package'};
return (@{$files{"$packid-$repoid.$ext"}}) if defined($repoid) && $files{"$packid-$repoid.$ext"};
# 28.4.2009 mls: deleted "&& defined($repoid)"
Expand Down

0 comments on commit 7311ed9

Please sign in to comment.