upgradecheck upgradecheck-core+extras.conf, NONE, 1.1 upgradecheck.py, 1.2, 1.3

Ville Skytta (scop) fedora-extras-commits at redhat.com
Sat Jun 17 13:01:35 UTC 2006


Author: scop

Update of /cvs/fedora/upgradecheck
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26665

Modified Files:
	upgradecheck.py 
Added Files:
	upgradecheck-core+extras.conf 
Log Message:
Add FC[456]+updates into the mix.


--- NEW FILE upgradecheck-core+extras.conf ---
[main]
metadata_expire=0
keepcache=0

# FC3 not included because there's no SRPM repodata for FC3 updates

[FC4]
name=FC4
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/4/i386/os/

[FC5]
name=FC5
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/

[FC6]
name=FC6
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/

[FC4-updates]
name=FC4-updates
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/

[FC5-updates]
name=FC5-updates
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/

[FE3]
name=FE3
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/3/SRPMS/
baseurl=file:///srv/rpmbuild/extras/tree/extras/3/SRPMS/

[FE4]
name=FE4
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/4/SRPMS/
baseurl=file:///srv/rpmbuild/extras/tree/extras/4/SRPMS/

[FE5]
name=FE5
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/
baseurl=file:///srv/rpmbuild/extras/tree/extras/5/SRPMS/

[FE6]
name=FE6
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/
baseurl=file:///srv/rpmbuild/extras/tree/extras/development/SRPMS/


Index: upgradecheck.py
===================================================================
RCS file: /cvs/fedora/upgradecheck/upgradecheck.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- upgradecheck.py	17 Jun 2006 12:55:37 -0000	1.2
+++ upgradecheck.py	17 Jun 2006 13:01:26 -0000	1.3
@@ -25,10 +25,11 @@
 import smtplib
 from email.MIMEText import MIMEText
 import datetime
+import re
 
 mail_from = "buildsys at fedoraproject.org"
 mail_to = "fedora-extras-list at redhat.com"
-mail_subject = "Broken upgrade paths in Fedora Extras %s" % datetime.date.today()
+mail_subject = "Broken upgrade paths in FC+FE %s" % datetime.date.today()
 smtp_server = None
 
 dists = ('3', '4', '5', '6')
@@ -77,7 +78,7 @@
     for dist in dists:
         solver = MySolver(config = opts.config)
         for repo in solver.repos.repos.values():
-            if repo.id != dist:
+            if re.sub('\D+', '', repo.id) != dist:
                 repo.disable()
             else:
                 repo.enable()
@@ -116,34 +117,38 @@
 
     allnames = {} # Python < 2.4 compat, otherwise we'd use sorted(set(...))
     for dist in enabled_dists:
-        for l in solvers[dist].pkgSack.returnNewestByName():
-            for pkg in l:
-                allnames[pkg.name] = 1
-                pkgdict[dist][pkg.name] = (pkg.epoch, pkg.version, pkg.release)
+        for pkg in solvers[dist].pkgSack.returnNewestByNameArch():
+            if pkg.arch != "src":
+                pass
+            allnames[pkg.name] = 1
+            pkgdict[dist][pkg.name] = {
+                "evr": (pkg.epoch, pkg.version, pkg.release),
+                "repo": pkg.repoid,
+                }
     allnames = allnames.keys()
     allnames.sort(lambda x, y: cmp(x.lower(), y.lower()))
 
     report = []
 
     for name in allnames:
-        evrs = map(lambda x: pkgdict[x].get(name), enabled_dists)
+        pkgdata = map(lambda x: pkgdict[x].get(name), enabled_dists)
         last = None                         # last seen EVR
         bork = None                         # index of first repo w/ problem
         ix = 0
-        for evr in evrs:
-            if not evr:                     # missing
+        for curr in pkgdata:
+            if not curr:                    # missing
                 pass                        # TODO: detect holes in continuum
             elif last is None:              # first one seen
-                last = evr
-            elif compareEVR(last, evr) > 0: # versioning problem
+                last = curr["evr"]
+            elif compareEVR(last, curr["evr"]) > 0: # versioning problem
                 bork = ix - 1
                 break
             ix = ix + 1
         if bork is not None:
             ix = bork
             report.append(name + ":")
-            for evr in evrs[ix:]:           # onwards from the problem spot
-                report.append("  %s: %s" % (enabled_dists[ix], evrstr(evr)))
+            for curr in pkgdata[ix:]:       # onwards from the problem spot
+                report.append("  %s: %s (%s)" % (enabled_dists[ix], evrstr(curr["evr"]), curr["repo"]))
                 ix = ix + 1
             report.append("")
 




More information about the fedora-extras-commits mailing list