diff options
author | Oliver Tappe | 2007-07-07 00:06:48 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-07-07 00:06:48 +0200 |
commit | 9686826b957a513a861edbdb3c3e3373401747b8 (patch) | |
tree | d4e7b28c4405506e814ddbd722e467e894fad272 /installer | |
parent | * modified default selection to (roughly) match the SUSE textmode installation (diff) | |
download | core-9686826b957a513a861edbdb3c3e3373401747b8.tar.gz core-9686826b957a513a861edbdb3c3e3373401747b8.tar.xz core-9686826b957a513a861edbdb3c3e3373401747b8.zip |
* revitalised local URLs
* simplified format of local URLs to consist of only a path
* adjusted meta-packagers to use mirrors only in case of non-local URLs
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1232 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r-- | installer/OpenSLX/OSSetup/Engine.pm | 21 | ||||
-rw-r--r-- | installer/OpenSLX/OSSetup/MetaPackager/smart.pm | 3 | ||||
-rw-r--r-- | installer/OpenSLX/OSSetup/MetaPackager/yum.pm | 3 |
3 files changed, 17 insertions, 10 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 9ae3e90a..6846eef6 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -588,12 +588,12 @@ sub readDistroInfo my $bootstrap_packages = $self->{distro}->{config}->{'bootstrap-packages'}; my $metapackager_packages = $self->{distro}->{config}->{'metapackager-packages'}; - my $file = "$self->{'config-distro-info-dir'}/settings"; + my $file = "$self->{'config-distro-info-dir'}/settings"; if (-e $file) { vlog(2, "reading configuration file $file..."); my $config = slurpFile($file); - if (!eval { $config } && length($@)) { + if (!eval "$config" && length($@)) { die _tr("error in config-file '%s' (%s)", $file, $@) . "\n"; } } @@ -785,9 +785,10 @@ sub startLocalURLServersAsNeeded $self->{'local-http-server-master-pid'} = $$; + my $port = 5080; foreach my $repoInfo (values %{$self->{'distro-info'}->{repository}}) { my $localURL = $repoInfo->{url} || ''; - next unless $localURL =~ m[^local:]; + next if $localURL =~ m[^\w+:]; if (!exists $self->{'local-http-servers'}->{$localURL}) { my $busyboxName = $self->hostIs64Bit() @@ -795,16 +796,20 @@ sub startLocalURLServersAsNeeded : 'busybox.i586'; my $busybox = "$openslxConfig{'base-path'}/share/busybox/$busyboxName"; - my $port = 5080; - if ($localURL =~ m[:(\d+)/]) { - $port = $1; - } my $pid = executeInSubprocess( $busybox, "httpd", '-p', $port, '-h', '/', '-f' ); - vlog(1, _tr("started local HTTP-server for URL '%s'.", $localURL)); + vlog(1, + _tr( + "started local HTTP-server for URL '%s' on port '%s'.", + $localURL, $port + ) + ); $self->{'local-http-servers'}->{$localURL} = $pid; + $repoInfo->{'url'} = "http://localhost:$port$localURL"; + $repoInfo->{'avoid-mirrors'} = 1; + $port++; } } } diff --git a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm index 6e411a89..64773d17 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm @@ -72,7 +72,8 @@ sub setupPackageSource if (slxsystem("smart channel -y --add $repoDescr")) { die _tr("unable to add channel '%s' (%s)\n", $repoName, $!); } - unless ($ENV{SLX_NO_MIRRORS}) { + my $avoidMirrors = $repoInfo->{'avoid-mirrors'} || 0; + unless ($ENV{SLX_NO_MIRRORS} || $avoidMirrors) { my $mirrorDescr; foreach my $mirrorURL (@$repoURLs) { $mirrorDescr .= " --add $baseURL$repoSubdir $mirrorURL$repoSubdir"; diff --git a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm index a1d2fa42..6dfe9523 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm @@ -66,7 +66,8 @@ sub setupPackageSource my $repoDescr = "[$repoName]\nname=$repoInfo->{name}\nbaseurl=$baseURL$repoSubdir\n"; - unless ($ENV{SLX_NO_MIRRORS}) { + my $avoidMirrors = $repoInfo->{'avoid-mirrors'} || 0; + unless ($ENV{SLX_NO_MIRRORS} || $avoidMirrors) { foreach my $mirrorURL (@$repoURLs) { $repoDescr .= " $mirrorURL$repoSubdir\n"; } |