summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorAlexander Hoppe2009-09-24 15:58:31 +0200
committerAlexander Hoppe2009-09-24 15:58:31 +0200
commit10e821c1dac25f4ea2d3278fbe0ef7ece6edba3e (patch)
tree2f1ffe2100c0f85a1d1dcde82f84fcc67773712b /installer
parentremoved bug which produced an error every second run of demuxer (diff)
downloadcore-10e821c1dac25f4ea2d3278fbe0ef7ece6edba3e.tar.gz
core-10e821c1dac25f4ea2d3278fbe0ef7ece6edba3e.tar.xz
core-10e821c1dac25f4ea2d3278fbe0ef7ece6edba3e.zip
improved way of giving package names so that it should be enough to give the name an perhaps the major version number
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3157 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm20
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;
}