summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cobbler/action_import.py5
-rw-r--r--cobbler/action_sync.py9
2 files changed, 9 insertions, 5 deletions
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 669c2f1..1f35b44 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -308,7 +308,10 @@ class Importer:
fname = os.path.join(self.settings.webdir, "ks_mirror", "config", "%s-%s.repo" % (distro.name, counter))
repo_url = "http://%s/cobbler/ks_mirror/config/%s-%s.repo" % (self.settings.server, distro.name, counter)
- distro.source_repos.append(repo_url)
+
+ repo_url2 = "http://%s/cobbler/ks_mirror/%s" % (self.settings.server, urlseg)
+
+ distro.source_repos.append([repo_url,repo_url2])
print "- url: %s" % repo_url
config_file = open(fname, "w+")
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index a00d82f..4203da8 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -396,8 +396,8 @@ class BootSync:
# if there is only one, then there is no need to do this.
if len(distro.source_repos) > 1:
for r in distro.source_repos:
- base = r.split("/")[-1].replace(".repo","")
- buf = buf + "repo --name=%s --baseurl=%s\n" % (base, r)
+ base = r[1].split("/")[-1].replace(".repo","")
+ buf = buf + "repo --name=%s --baseurl=%s\n" % (base, r[1])
return buf
@@ -409,14 +409,15 @@ class BootSync:
repo = self.repos.find(r)
if repo is None:
continue
+ repo.local_filename = repo.local_filename.replace(".repo","")
if not (repo.local_filename is None) or (repo.local_filename == ""):
buf = buf + "wget http://%s/cblr/repo_mirror/%s/config.repo --output-document=/etc/yum.repos.d/%s.repo\n" % (self.settings.server, repo.name, repo.local_filename)
# now install the core repos
distro = self.distros.find(profile.distro)
for r in distro.source_repos:
- short = r.split("/")[-1]
- buf = buf + "wget %s --output-document=/etc/yum.repos.d/%s.repo\n" % (r, short)
+ short = r[0].split("/")[-1]
+ buf = buf + "wget %s --output-document=/etc/yum.repos.d/%s\n" % (r[0], short)
# if there were any core repos, install the voodoo to disable the OS public core
# location -- FIXME: should probably run sed on the files, rather than rename them.