server/mirrormanager/repomap.py | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 92e533f6064d7652e6bf9769fe468709ba6867b3
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Tue Nov 15 22:37:44 2011 -0600
repomap: add CentOS repository prefixes
diff --git a/server/mirrormanager/repomap.py b/server/mirrormanager/repomap.py
index 27665b6..99b10ef 100644
--- a/server/mirrormanager/repomap.py
+++ b/server/mirrormanager/repomap.py
@@ -93,6 +93,7 @@ def repo_prefix(path, category, ver):
isRrpmfusionNonfreeFedora = (category.name == u'RPMFUSION nonfree Fedora')
isRhel = (category.name == u'RHEL')
+ isCentOS = (category.product and category.product.name == u'CentOS' and
category.name == u'Releases')
version = u'unknown'
if not isRawhide and ver is not None:
@@ -367,4 +368,13 @@ def repo_prefix(path, category, ver):
if prefix and isBeta:
prefix = u'%s-beta' % prefix
+ elif isCentOS:
+ prefixes = (u'addons', u'centosplus', u'contrib',
u'cr',
+ u'csgfs', u'extras', u'fasttrack',
u'os',
+ u'testing', u'updates')
+ for p in prefixes:
+ if u'/%s/' % p in path:
+ prefix = u'%s-%s' % (p, version)
+ break
+
return prefix
Show replies by date