summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm21
-rw-r--r--installer/OpenSLX/OSSetup/MetaPackager/smart.pm3
-rw-r--r--installer/OpenSLX/OSSetup/MetaPackager/yum.pm3
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";
}