diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-11-01 18:32:33 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-11-01 18:32:33 -0400 |
commit | 4fecb38e0ca6eac21b5093aa4122c597ce4f23e1 (patch) | |
tree | 9644f14fefebb9167522e06e468bfac992353750 /cobbler | |
parent | a5b3913efb93946974bd3c9444a3810250378ccc (diff) | |
download | third_party-cobbler-4fecb38e0ca6eac21b5093aa4122c597ce4f23e1.tar.gz third_party-cobbler-4fecb38e0ca6eac21b5093aa4122c597ce4f23e1.tar.xz third_party-cobbler-4fecb38e0ca6eac21b5093aa4122c597ce4f23e1.zip |
Since some versions of yumdownloader don't support --resolve, allow people to remove
it by moving it to the configuration file. By default, it will be there, but this provides
a fix for those running OS's with an old version of yum/yumdownloader. If -resolve is not
in settings, --rpmlist on "cobbler repo add" needs to include all dependencies for the packages
listed, which could be a rather long list.
Diffstat (limited to 'cobbler')
-rw-r--r-- | cobbler/action_reposync.py | 5 | ||||
-rw-r--r-- | cobbler/settings.py | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 8cd738f..d49efd1 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -110,6 +110,8 @@ class RepoSync: # how we invoke yum-utils depends on whether this is RHN content or not. + + if not is_rhn: # this is the simple non-RHN case. @@ -138,7 +140,8 @@ class RepoSync: # older yumdownloader sometimes explodes on --resolvedeps # if this happens to you, upgrade yum & yum-utils - cmd = "/usr/bin/yumdownloader --resolve %s -c %s --destdir=%s %s" % (use_source, temp_file, dest_path, " ".join(repo.rpm_list)) + extra_flags = self.settings.yumdownloader_flags + cmd = "/usr/bin/yumdownloader %s %s -c %s --destdir=%s %s" % (extra_flags, use_source, temp_file, dest_path, " ".join(repo.rpm_list)) print _("- %s") % cmd cmds.append(cmd) else: diff --git a/cobbler/settings.py b/cobbler/settings.py index 6573b40..c68e0bf 100644 --- a/cobbler/settings.py +++ b/cobbler/settings.py @@ -53,7 +53,8 @@ DEFAULTS = { "xmlrpc_port" : 25151, "xmlrpc_rw_enabled" : 0, "xmlrpc_rw_port" : 25152, - "yum_core_mirror_from_server" : 0 + "yum_core_mirror_from_server" : 0, + "yumdownloader_flags" : "-resolve" } |