Repository :
http://git.fedorahosted.org/cgit/
On branch : master
---------------------------------------------------------------
commit 4eb899bee246f72e6d13818944b35e70098a0d65
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Jul 24 14:07:26 2013 -0500
remove more unused references to Fedora Core and Extras
---------------------------------------------------------------
server/dev.cfg | 25 ++++------
server/errorcheck | 41 +++++++---------
server/mirrormanager/model.py | 4 +-
server/mirrormanager/repomap.py | 99 +--------------------------------------
4 files changed, 30 insertions(+), 139 deletions(-)
diff --git a/server/dev.cfg b/server/dev.cfg
index 03288da..646cc53 100644
--- a/server/dev.cfg
+++ b/server/dev.cfg
@@ -23,27 +23,20 @@
# update-master-directory-list upstream definition
# a dictionary in a list with following content
-# [{ 'type':'type (rsync or file)',
-# 'url':'rsync URL or file path',
+# [{ 'type':'type (rsync, or directory)',
+# 'url':'rsync URL or directory path',
# 'category':'category name',
# 'options':'extra rsync options' }]
# remember to end URLs with a slash!
# type=directory 'excludes' is a regular expression.
umdl.master_directories = ''' [
-# { 'type':'file', 'url':'/tmp/fedora-linux-core.txt',
'category':'Fedora Core' },
-# { 'type':'file', 'url':'/tmp/fedora-linux-extras.txt',
'category':'Fedora Extras' },
- { 'type':'rsync', 'url':'/pub/epel/',
'category':'Fedora EPEL' },
-# { 'type':'rsync', 'url':'/pub/fedora/linux/',
'category':'Fedora Linux',
-# 'options':"--exclude='**/core/' --exclude='**/extras/'
--exclude='**/[7-8]'" },
- { 'type':'rsync',
'url':'rsync://secondary1.fedora.phx.redhat.com/fedora-secondary/',
- 'category':'Fedora Secondary Arches' },
- { 'type':'rsync',
'url':'rsync://secondary1.fedora.phx.redhat.com/fedora-archive/',
- 'category':'Fedora Archive',
- 'options':"--exclude='**/core/'
--exclude='**/extras/'" },
- { 'type':'rsync',
'url':'rsync://secondary1.fedora.phx.redhat.com/alt/',
- 'category':'Fedora Other' },
- { 'type':'directory', 'path':'/pub/fedora/linux/',
- 'category':'Fedora Linux', 'excludes':['.*/core/?.*',
'.*/extras/?.*', '.*/[7-8]/?.*' ] },
+ { 'type':'directory', 'path':'/pub/epel/',
'category':'Fedora EPEL' },
+ { 'type':'directory', 'path':'/pub/fedora/linux/',
'category':'Fedora Linux'},
+ { 'type':'directory', 'path':'/pub/fedora-secondary/',
'category':'Fedora Secondary Arches' },
+ { 'type':'directory', 'path':'/pub/archive/',
'category':'Fedora Archive'},
+ { 'type':'directory',
'path':'/pub/alt/','category':'Fedora Other' },
+# { 'type':'directory', 'path':'/pub/fedora/linux/',
+# 'category':'Fedora Linux', 'excludes':['.*/core/?.*',
'.*/extras/?.*', '.*/[7-8]/?.*' ] },
# { 'type':'rsync',
'url':'rsync://archive.ubuntu.com/ubuntu/',
# 'category':'Ubuntu Archive' },
# { 'type':'rsync',
'url':'rsync://releases.ubuntu.com/releases/',
diff --git a/server/errorcheck b/server/errorcheck
index cb11a99..933c555 100755
--- a/server/errorcheck
+++ b/server/errorcheck
@@ -238,32 +238,29 @@ def check_host(sr, host):
always_up2date = False
- undesired_categories = [u'Fedora Core', u'Fedora Extras']
-
for hc in host.categories:
- if hc.category.name not in undesired_categories:
- if len(hc.urls) == 0:
- msg = u"* Host %s Category %s has no URLs. Please add a URL to
the content your mirror carries, or if not carried, delete the Category." %
(host.name, hc.category.name)
- host_messages.append(msg)
+ if len(hc.urls) == 0:
+ msg = u"* Host %s Category %s has no URLs. Please add a URL to the
content your mirror carries, or if not carried, delete the Category." % (host.name,
hc.category.name)
+ host_messages.append(msg)
- has_rsync = False
- for url in hc.urls:
- if url.url.startswith(u'rsync://'):
- has_rsync = True
- break
- if not has_rsync:
- if (host.internet2 and host.internet2_clients) or not host.is_private():
- msg = u"* Please consider adding an rsync URL for Category %s.
This will speed up the MirrorManager crawler and reduce load on your server. URLs can be
marked 'for other mirrors only', in which case they will not appear in
publiclists, mirrorlists, or metalinks, but will be available to the MirrorManager
crawler. If necessary, you can restrict access to only allow from the MirrorManager
crawler through a 'hosts allow = 209.132.181.0/24' line in your rsyncd.conf
file." % hc.category.name
- host_messages.append(msg)
+ has_rsync = False
+ for url in hc.urls:
+ if url.url.startswith(u'rsync://'):
+ has_rsync = True
+ break
+ if not has_rsync:
+ if (host.internet2 and host.internet2_clients) or not host.is_private():
+ msg = u"* Please consider adding an rsync URL for Category %s. This
will speed up the MirrorManager crawler and reduce load on your server. URLs can be
marked 'for other mirrors only', in which case they will not appear in
publiclists, mirrorlists, or metalinks, but will be available to the MirrorManager
crawler. If necessary, you can restrict access to only allow from the MirrorManager
crawler through a 'hosts allow = 209.132.181.0/24' line in your rsyncd.conf
file." % hc.category.name
+ host_messages.append(msg)
- if hc.always_up2date: always_up2date = True
- if len(hc.dirs) == 0 and not hc.always_up2date:
- msg = u"* Host %s Category %s has no up-to-date directories. "
% (host.name, hc.category.name)
- if len(hc.urls) > 0:
- msg += u"Check that your Category URL points to %s. " %
(hc.category.topdir.name)
+ if hc.always_up2date: always_up2date = True
+ if len(hc.dirs) == 0 and not hc.always_up2date:
+ msg = u"* Host %s Category %s has no up-to-date directories. " %
(host.name, hc.category.name)
+ if len(hc.urls) > 0:
+ msg += u"Check that your Category URL points to %s. " %
(hc.category.topdir.name)
- msg += u"* Consult the crawler logs and check your
report_mirror.conf."
- host_messages.append(msg)
+ msg += u"* Consult the crawler logs and check your
report_mirror.conf."
+ host_messages.append(msg)
private_msg = u" Private mirrors must run report_mirror after each rsync run
completes in order for MirrorManager to know what content your mirror carries. The
crawler does not generally run against private mirrors."
diff --git a/server/mirrormanager/model.py b/server/mirrormanager/model.py
index 4160894..54bd2f9 100644
--- a/server/mirrormanager/model.py
+++ b/server/mirrormanager/model.py
@@ -706,8 +706,6 @@ class Directory(SQLObject):
class sqlmeta:
cacheValues = False
# Full path
- # e.g. pub/fedora/linux/core/6/i386/os
- # e.g. pub/fedora/linux/extras
# e.g. pub/epel
# e.g. pub/fedora/linux
name = UnicodeCol(alternateID=True, length=UnicodeColKeyLength)
@@ -782,7 +780,7 @@ class Category(SQLObject):
class sqlmeta:
cacheValues = False
# Top-level mirroring
- # e.g. core, extras, release, epel
+ # e.g. 'Fedora Linux', 'Fedora Archive'
name = UnicodeCol(alternateID=True, length=UnicodeColKeyLength)
product = ForeignKey('Product')
canonicalhost = UnicodeCol(default='http://download.fedora.redhat.com')
diff --git a/server/mirrormanager/repomap.py b/server/mirrormanager/repomap.py
index 4360850..548f558 100644
--- a/server/mirrormanager/repomap.py
+++ b/server/mirrormanager/repomap.py
@@ -1,54 +1,3 @@
-# The various name permutations for mirrorlist files are:
-# core-6-US-i386.txt and core-6-global-i386.txt
-# core-source-6-global-i386.txt (no per-country)
-# core-debug-6-global-i386.txt (no per-country)
-# extras-6-US-i386.txt and extras-6-glboal-i386.txt
-# extras-source-6-global-i386.txt (no per-country)
-# extras-debug-6-global-i386.txt (no per-country)
-# rawhide-US-i386.txt
-# updates-released-6-US-i386.txt
-# updates-released-debug-fc6-US-i386.txt
-# updates-released-
-#
-# country or global is usually appended
-# basearch is always appended coming from the mirrorlist cgi
-# to the key, the value $releasever is always appended, except for rawhide and
development
-# hint - this isn't actually used by anything right now
-repomap = {
- u'core-' : (u'Fedora', u'Fedora Core'),
- u'core-debug-' : (u'Fedora', u'Fedora Core'),
- u'core-source-' : (u'Fedora', u'Fedora Core'),
-
- u'updates-released-' : (u'Fedora', u'Fedora Core'),
- u'updates-released-debug-' : (u'Fedora', u'Fedora Core'),
- u'updates-released-source-' : (u'Fedora', u'Fedora Core'),
-
- u'updates-testing-' : (u'Fedora', u'Fedora Core'),
- u'updates-testing-debug-' : (u'Fedora', u'Fedora Core'),
- u'updates-testing-source-' : (u'Fedora', u'Fedora Core'),
-
- u'rawhide' : (u'Fedora', u'Fedora Linux'),
- u'rawhide-debug' : (u'Fedora', u'Fedora Linux'),
- u'rawhide-source' : (u'Fedora', u'Fedora Linux'),
-
- u'extras-' : (u'Fedora', u'Fedora Extras'),
- u'extras-debug-' : (u'Fedora', u'Fedora Extras'),
- u'extras-source-' : (u'Fedora', u'Fedora Extras'),
-
- u'extras-devel' : (u'Fedora', u'Fedora Extras'),
- u'extras-devel-debug' : (u'Fedora', u'Fedora Extras'),
- u'extras-devel-source' : (u'Fedora', u'Fedora Extras'),
-
- u'epel-' : (u'EPEL', u'Fedora EPEL'),
- u'epel-debug-' : (u'EPEL', u'Fedora EPEL'),
- u'epel-source-' : (u'EPEL', u'Fedora EPEL'),
-
- u'rhel-' : (u'RHEL', u'RHEL'),
- u'rhel-debug-' : (u'RHEL', u'RHEL'),
- u'rhel-source-' : (u'RHEL', u'RHEL'),
- u'rhel-optional-' : (u'RHEL', u'RHEL'),
- }
-
import re
def is_development(path):
@@ -80,8 +29,6 @@ def repo_prefix(path, category, ver):
isEverything = u'Everything' in path
- isCore = u'core/' in path
- isExtras = u'extras/' in path
isEpel = (category.name == u'Fedora EPEL')
isFedoraLinux = (category.name == u'Fedora Linux')
isFedoraSecondary = (category.name == u'Fedora Secondary Arches')
@@ -98,51 +45,7 @@ def repo_prefix(path, category, ver):
if not isRawhide and ver is not None:
version = ver['name']
- if isCore:
- if isUpdatesReleased:
- # updates-released-
- if isDebug:
- prefix = u'updates-released-debug-fc%s' % version
- elif isSource:
- prefix = u'updates-released-source-fc%s' % version
- else:
- prefix = u'updates-released-fc%s' % version
- elif isUpdatesTesting:
- # updates-testing-
- if isDebug:
- prefix = u'updates-testing-debug-fc%s' % version
- elif isSource:
- prefix = u'updates-testing-source-fc%s' % version
- else:
- prefix = u'updates-testing-fc%s' % version
- elif isRawhide:
- # rawhide
- # Core rawhide is dead.
- prefix = None
- else:
- # core-
- if isDebug:
- prefix = u'core-debug-%s' % version
- elif isSource:
- prefix = u'core-source-%s' % version
- else:
- prefix = u'core-%s' % version
-
- elif isExtras:
- if isRawhide:
- # extras-development
- # extras-development is dead.
- prefix = None
- else:
- # extras-
- if isDebug:
- prefix = u'extras-debug-%s' % version
- elif isSource:
- prefix = u'extras-source-%s' % version
- else:
- prefix = u'extras-%s' % version
-
- elif isEpel:
+ if isEpel:
# epel-
if isTesting:
# testing-