diff options
author | Daniel Drake <dsd@laptop.org> | 2011-10-06 11:38:11 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2011-10-06 11:38:11 (GMT) |
commit | cc259948a0938c7eaf1c9fc57174b9233268eecb (patch) | |
tree | edeee971b3a205b257959197baed9b654320fc3e | |
parent | cfd2aefc7d2d3436da6c4f0511c2b733e4d7f865 (diff) |
repos: fix hyphen/underscore confusion
Koji repos use hyphens and it wouldn't be a good idea to rename
them all. So restrict the hyphen-to-underscore conversion for
compatibility with Fedora repo names only.
-rw-r--r-- | modules/repos/ksmain.50.repos.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/repos/ksmain.50.repos.py b/modules/repos/ksmain.50.repos.py index e1dee21..c6b3872 100644 --- a/modules/repos/ksmain.50.repos.py +++ b/modules/repos/ksmain.50.repos.py @@ -31,9 +31,18 @@ def add_to_excludes(baseurl, addexcludes): # clean up addexcludes list if addexcludes is not None: - addexcludes = addexcludes.replace('-', '_').split(',') + addexcludes = addexcludes.split(',') for idx, excl in enumerate(addexcludes): - addexcludes[idx] = excl.strip() + excl = excl.strip() + + # Support hyphenated fedora repo notation, as this matches the + # default files in /etc/yum.repos.d + if excl == 'fedora-updates-testing': + excl = 'fedora_updates_testing' + elif excl == 'fedora-updates': + excl = 'fedora_updates' + + addexcludes[idx] = excl else: addexcludes = [] |