check-mirrors check-mirrors.conf, 1.9, 1.10 check-mirrors.py, 1.31, 1.32 return-mirrorlist.py, 1.17, 1.18
Michael Patrick McGrath (mmcgrath)
fedora-extras-commits at redhat.com
Thu Oct 26 20:57:54 UTC 2006
Author: mmcgrath
Update of /cvs/fedora/check-mirrors
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21911
Modified Files:
check-mirrors.conf check-mirrors.py return-mirrorlist.py
Log Message:
fixed multiple bugs discovered during the FC6 launch
return mirrors had a recursive function that would get called regularly
check-mirrors assumed that when an update failed, it should insert. Not the case if the db is simply locked.
Index: check-mirrors.conf
===================================================================
RCS file: /cvs/fedora/check-mirrors/check-mirrors.conf,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- check-mirrors.conf 2 Aug 2006 22:03:46 -0000 1.9
+++ check-mirrors.conf 26 Oct 2006 20:57:52 -0000 1.10
@@ -1,52 +1,175 @@
[global]
-db=/tmp/mirrors.db
+db=/var/www/mirrors/mirrors.db
+
+[rawhide]
+inputfile = http://fedoraproject.org/mirrors/fedora-core-rawhide
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://Download.fedoraproject.org/pub/fedora/linux/core/development/$ARCH/os/
+file_prefix = rawhide
+
+[core-6]
+inputfile = http://fedoraproject.org/mirrors/fedora-core-6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$ARCH/os/
+file_prefix = core-6
+
+[extras-6]
+inputfile = http://fedoraproject.org/mirrors/fedora-extras-6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/extras/6/$ARCH/
+file_prefix = extras-6
+
+[updates-released-fc6]
+inputfile = http://fedoraproject.org/mirrors/updates-released-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/6/$ARCH/
+file_prefix = updates-released-fc6
+
+[updates-released-debug-fc6]
+inputfile = http://fedoraproject.org/mirrors/updates-released-debug-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/6/$ARCH/debug/
+file_prefix = updates-released-debug-fc6
+
+[updates-released-source-fc6]
+inputfile = http://fedoraproject.org/mirrors/updates-released-source-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/6/SRPMS/
+file_prefix = updates-released-source-fc6
+
+[updates-testing-source-fc6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-source-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/testing/6/SRPMS/
+file_prefix = updates-testing-source-fc6
+
+[updates-testing-fc6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/testing/6/$ARCH/
+file_prefix = updates-testing-fc6
+
+[updates-testing-debug-fc6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-debug/fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/testing/6/$ARCH/debug
+file_prefix = updates-testing-fc6
+
+[core-source-6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/SRPMS/
+file_prefix = core-source-6
+
+[extras-source-6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/extras/6/SRPMS/
+file_prefix = extras-source-6
+
+[core-debug-6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$ARCH/debug/
+file_prefix = core-debug-6
+
+[extras-debug-6]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/extras/6/$ARCH/debug/
+file_prefix = extras-debug-6
+
+[legacy-updates-6]
+inputfile = http://fedoraproject.org/mirrors/legacy-updates-released-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://download.fedoralegacy.org/fedora/6/updates/$ARCH
+file_prefix = legacy-updates-6
+
+[legacy-updates-testing-6]
+inputfile = http://fedoraproject.org/mirrors/legacy-updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://download.fedoralegacy.org/fedora/6/updates-testing/$ARCH
+file_prefix = legacy-updates-6
+
+
+[extras-source-devel]
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc6
+outputpath = /var/www/mirrors
+archlist = i386, x86_64, ppc
+timeout = 2
+canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/extras/development/SRPMS/
+file_prefix = extras-source-devel
+
+
[core-5]
-inputfile = http://fedora.redhat.com/download/mirrors/fedora-core-5
-outputpath = /tmp/var/www/mirrors
+inputfile = http://fedoraproject.org/mirrors/fedora-core-5
+outputpath = /var/www/mirrors
archlist = i386, x86_64, ppc
-timeout = 10
+timeout = 2
canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$ARCH/os/
file_prefix = core-5
[extras-5]
-inputfile = http://fedora.redhat.com/download/mirrors/fedora-extras-5
-outputpath = /tmp/var/www/mirrors
+inputfile = http://fedoraproject.org/mirrors/fedora-extras-5
+outputpath = /var/www/mirrors
archlist = i386, x86_64, ppc
-timeout = 10
+timeout = 2
canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/extras/5/$ARCH/
file_prefix = extras-5
[updates-released-5]
-inputfile = http://fedora.redhat.com/download/mirrors/fedora-core-5
-outputpath = /tmp/var/www/mirrors
+inputfile = http://fedoraproject.org/mirrors/updates-released-fc5
+outputpath = /var/www/mirrors
archlist = i386, x86_64, ppc
-timeout = 10
+timeout = 2
canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/5/$ARCH/
file_prefix = updates-released-5
[updates-testing-5]
-inputfile = http://fedora.redhat.com/download/mirrors/updates-testing-fc5
-outputpath = /tmp/var/www/mirrors
+inputfile = http://fedoraproject.org/mirrors/updates-testing-fc5
+outputpath = /var/www/mirrors
archlist = i386, x86_64, ppc
-timeout = 10
+timeout = 2
canonical = http://redhat.download.fedoraproject.org/pub/fedora/linux/core/updates/testing/5/$ARCH/
file_prefix = updates-testing-5
-[rawhide]
-inputfile = http://fedora.redhat.com/download/mirrors/fedora-core-rawhide
-outputpath = /tmp/var/www/mirrors
-archlist = i386, x86_64, ppc
-timeout = 10
-canonical = http://download.fedoraproject.org/pub/fedora/linux/core/development/$ARCH/os/
-file_prefix = rawhide
-
[extras-devel]
-inputfile = http://fedora.redhat.com/download/mirrors/fedora-extras-devel
-outputpath = /tmp/var/www/mirrors
+inputfile = http://fedoraproject.org/mirrors/fedora-extras-devel
+outputpath = /var/www/mirrors
archlist = i386, x86_64, ppc
-timeout = 10
-canonical = http://download.fedoraproject.org/pub/fedora/linux/extras/development/$ARCH/
+timeout = 2
+canonical = http://Download.fedoraproject.org/pub/fedora/linux/extras/development/$ARCH/
file_prefix = extras-devel
#legacy-updates-released
Index: check-mirrors.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/check-mirrors.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- check-mirrors.py 27 Sep 2006 01:49:59 -0000 1.31
+++ check-mirrors.py 26 Oct 2006 20:57:52 -0000 1.32
@@ -27,7 +27,7 @@
# - pull mirrors from the database instead of fedora.redhat.com ?
-debug = False
+debug = True
__revision__ = '$Id$'
CONFIG = '/etc/check-mirrors.conf'
@@ -102,6 +102,8 @@
self.dbcursor.execute(sql)
self.dbconn.commit()
except sqlite.Error, errmsg:
+ if '%s' % errmsg == 'database is locked':
+ return 1
errorprint("Query: %s" % sql)
errorprint("Query Error: %s" % errmsg)
return False
Index: return-mirrorlist.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/return-mirrorlist.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- return-mirrorlist.py 15 Oct 2006 04:02:23 -0000 1.17
+++ return-mirrorlist.py 26 Oct 2006 20:57:52 -0000 1.18
@@ -78,7 +78,7 @@
dataList.append([ item for item in row])
return dataList
- def printMirrors(self):
+ def printMirrors(self,recursive=0):
""" Print mirrors """
rows = self.getMirrors(self.repo, self.arch, self.country)
results = 0
@@ -88,11 +88,11 @@
results = results + 1
if results == 0:
- if self.country != 'global':
+ if self.country != 'global' and recursive == 0:
print '# No results found for country: %s\n# Defaulting to global' % self.country
#self.country='global'
self.countrySQL=''
- self.printMirrors()
+ self.printMirrors(recursive = 1)
#self.printMirrors(self.repo, self.arch, 'global')
else:
print '# no mirrors found, using default'
More information about the scm-commits
mailing list