summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSSetup/MetaPackager/yum.pm
diff options
context:
space:
mode:
authorOliver Tappe2007-05-28 15:29:45 +0200
committerOliver Tappe2007-05-28 15:29:45 +0200
commitd7afcd0a5a3d03251991bc7fc91ba14b38a92fc8 (patch)
treec8bd01847af67ab915cd60abaa25183e56505157 /installer/OpenSLX/OSSetup/MetaPackager/yum.pm
parent* changed slxsystem to ignore SIGPIPE instead of exiting, as this used to cause (diff)
downloadcore-d7afcd0a5a3d03251991bc7fc91ba14b38a92fc8.tar.gz
core-d7afcd0a5a3d03251991bc7fc91ba14b38a92fc8.tar.xz
core-d7afcd0a5a3d03251991bc7fc91ba14b38a92fc8.zip
* integrated mirror support into yum & smart backend
* fixed smart backend with respect to being restarted (it no longer stops, waiting for you to enter an alternative name for any existing channel) * the use of mirrors can now be deactivated with SLX_NO_MIRROR=1, very useful for development git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1095 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSSetup/MetaPackager/yum.pm')
-rw-r--r--installer/OpenSLX/OSSetup/MetaPackager/yum.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm
index acdb470d..6be391f0 100644
--- a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm
+++ b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm
@@ -58,11 +58,20 @@ sub setupPackageSource
my $repoInfo = shift;
my $excludeList = shift;
- my $repoURL = $self->{engine}->selectBaseURL($repoInfo);
+ my $repoSubdir;
if (length($repoInfo->{'repo-subdir'})) {
- $repoURL .= "/$repoInfo->{'repo-subdir'}";
+ $repoSubdir = "/$repoInfo->{'repo-subdir'}";
+ }
+ my $repoURLs = $self->{engine}->sortRepositoryURLs($repoInfo);
+ my $baseURL = shift @$repoURLs;
+
+ my $repoDescr
+ = "[$repoName]\nname=$repoInfo->{name}\nbaseurl=$baseURL$repoSubdir\n";
+ unless ($ENV{SLX_NO_MIRRORS}) {
+ foreach my $mirrorURL (@$repoURLs) {
+ $repoDescr .= " $mirrorURL$repoSubdir\n";
+ }
}
- my $repoDescr = "[$repoName]\nname=$repoInfo->{name}\nbaseurl=$repoURL\n";
my $repoFile = "/etc/yum.repos.d/$repoName.repo";
open(REPO, "> $repoFile")
or die _tr("unable to create repo-file <%s> (%s)\n", $repoFile, $1);