summaryrefslogtreecommitdiffstats
path: root/cobbler/action_reposync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-10-29 10:42:30 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-10-29 10:42:30 -0400
commit66c992465c21d617f7de5f3d1e9e1ae59a7c87cf (patch)
treed486ce3b702649d370a78650773478e1e3d9a60f /cobbler/action_reposync.py
parented3873ed40ccde84ec18e27a7aa43147269056fa (diff)
downloadthird_party-cobbler-66c992465c21d617f7de5f3d1e9e1ae59a7c87cf.tar.gz
third_party-cobbler-66c992465c21d617f7de5f3d1e9e1ae59a7c87cf.tar.xz
third_party-cobbler-66c992465c21d617f7de5f3d1e9e1ae59a7c87cf.zip
Apply patch to restore --arch parameter and handling to cobbler repo
management.
Diffstat (limited to 'cobbler/action_reposync.py')
-rw-r--r--cobbler/action_reposync.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py
index e932309..7fac220 100644
--- a/cobbler/action_reposync.py
+++ b/cobbler/action_reposync.py
@@ -118,9 +118,11 @@ class RepoSync:
temp_file = self.create_local_file(repo, temp_path, output=False)
if not has_rpm_list:
-
# if we have not requested only certain RPMs, use reposync
cmd = "/usr/bin/reposync --config=%s --repoid=%s --download_path=%s" % (temp_file, repo.name, store_path)
+ if repo.arch != "":
+ cmd = "%s -a %s" % (cmd, repo.arch)
+
print _("- %s") % cmd
cmds.append(cmd)
@@ -130,9 +132,13 @@ class RepoSync:
if not os.path.exists(dest_path):
os.makedirs(dest_path)
+ use_source = ""
+ if repo.arch == "src":
+ use_source = "--source"
+
# older yumdownloader sometimes explodes on --resolvedeps
# if this happens to you, upgrade yum & yum-utils
- cmd = "/usr/bin/yumdownloader --resolve -c %s --destdir=%s %s" %(temp_file, dest_path, " ".join(repo.rpm_list))
+ cmd = "/usr/bin/yumdownloader --resolve %s -c %s --destdir=%s %s" % (use_source, temp_file, dest_path, " ".join(repo.rpm_list))
print _("- %s") % cmd
cmds.append(cmd)
else:
@@ -144,6 +150,10 @@ class RepoSync:
print _("- warning: --rpm-list is not supported for RHN content")
rest = repo.mirror[6:] # everything after rhn://
cmd = "/usr/bin/reposync -r %s --download_path=%s" % (rest, store_path)
+
+ if repo.arch != "":
+ cmd = "%s -a %s" % (cmd, repo.arch)
+
print _("- %s") % cmd
cmds.append(cmd)