diff options
Diffstat (limited to 'installer')
-rw-r--r-- | installer/OpenSLX/OSSetup/Engine.pm | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 1634c95c..ba901d23 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -68,6 +68,7 @@ use vars qw(%supportedDistros); ); my %localHttpServers; +my $filelisting; ################################################################################ ### interface methods @@ -1182,10 +1183,12 @@ sub _downloadBaseFiles { my $self = shift; my $files = shift; + use vars qw(@filelisting); my $pkgSubdir = $self->{'distro-info'}->{'package-subdir'}; my @URLs = @{$self->{'baseURLs'}}; my $maxTryCount = $openslxConfig{'ossetup-max-try-count'}; + my @possiblefiles; my @foundFiles; foreach my $fileVariantStr (@$files) { @@ -1197,9 +1200,20 @@ try_next_url: $url .= "/$pkgSubdir" if length($pkgSubdir); foreach my $file (split '\s+', $fileVariantStr) { - my $basefile = basename($file); - vlog(2, "fetching <$file>..."); - if (slxsystem("wget", "-c", "-O", "$basefile", "$url/$file") == 0) { + #substitute given name with real filename including version number + my $basefile = basename($file); + my $basedir = dirname($file)."/"; + @possiblefiles = grep(/^$basefile/,@filelisting); + #selecting always the first occurence + if ($possiblefiles[0]) { + $basefile = $possiblefiles[0]; + } elsif ($basefile =~ /.*\.rpm/) { + vlog(5,"Trying suggested name because of .rpm-ending."); + } else { + die _tr("file <$basefile> not found in list received from mirror"); + } + vlog(2, "fetching <$basefile>..."); + if (slxsystem("wget", "-c", "-O", "$basefile", "$url/$basedir$basefile") == 0) { $foundFile = $basefile; last; } |