Dennis Gilmore wrote:
> That's my fault I probably shouldn't have included f16 in there just
> updates
Indeed, only updates (which inherit the GA release builds) should be
compared in that script, not GA releases.
In addition, I had fixed the script to properly support updates-testing
repositories eons ago (should not compare fn-1-updates-testing with fn-
updates), but my patch (attached) was never merged because the script was to
be obsoleted by AutoQA anyway according to Jesse Keating. And now we are
STILL running the known broken script! A variant of the patch could probably
also accomodate the GA tags.
Kevin Kofler
--- check-upgrade-paths.py.orig 2008-07-28 02:30:24.000000000 +0200
+++ check-upgrade-paths.py.patched 2008-07-28 03:24:26.000000000 +0200
@@ -33,8 +33,12 @@
def usage():
print """
- check-upgrade-paths.py tag1 tag2 [tag3 tag4]
+ check-upgrade-paths.py tag1 [/]tag2 [[/]tag3 [/]tag4]
tags must be in ascending order, f8-gold dist-f8-updates dist-f8-updates-testing dist-f9-updates ...
+ prepending a / is special: A /B C means A will not be checked against B, but against the union of B and C
+ Only A is affected, everything preceding A will still be checked against B normally, as will B against C.
+ The usecase for this feature is updates-testing, e.g.:
+ dist-f8-updates dist-f8-updates-testing /dist-f9-updates dist-f9-updates-testing
"""
def compare(pkgA, pkgB):
@@ -86,14 +90,26 @@
usage()
sys.exit(1)
else:
- tags = sys.argv[1:]
+ cmdtags = sys.argv[1:]
kojisession = koji.ClientSession('http://koji.fedoraproject.org/kojihub')
tagdict = {}
pkgdict = {}
+slashdict = {}
badpaths = {}
badpathsbybuilder = {}
+# Remove prepended slashes and make a dict of them
+tags = []
+for tag in cmdtags:
+ if tag[0] == '/':
+ realtag = tag[1:]
+ tags.append(realtag)
+ slashdict[realtag] = True
+ else:
+ tags.append(tag)
+ slashdict[tag] = False
+
# Use multicall to get the latest tagged builds from each tag
kojisession.multicall = True
for tag in tags:
@@ -116,12 +132,18 @@
# then proceed to the next given tag and again compare upwards
for pkg in pkgdict:
for tag in tags[:-1]: # Skip the last tag since there is nothing to compare it to
- for nexttag in tags[tags.index(tag)+1:]: # Compare from current tag up
+ idx = tags.index(tag)
+ for nexttag in tags[idx+1:]: # Compare from current tag up
if pkgdict[pkg].has_key(tag):
if pkgdict[pkg].has_key(nexttag): # only compare if the next tag knows about this package
rc = compare(pkgdict[pkg][tag]['nvr'], pkgdict[pkg][nexttag]['nvr'])
if rc <= 0:
continue
+ if rc > 0 and tags.index(nexttag) == idx+1 and slashdict[nexttag] and idx+2 < len(tags):
+ # Broken? Need to check the next tag!
+ nextnexttag = tags[idx+2]
+ if pkgdict[pkg].has_key(nextnexttag):
+ rc = compare(pkgdict[pkg][tag]['nvr'], pkgdict[pkg][nextnexttag]['nvr'])
if rc > 0:
# We've got something broken here.
if not badpaths.has_key(pkg):
@@ -138,7 +160,7 @@
Subject: Package EVR problems in Fedora %s
""" % (fromaddr, toaddr, datetime.date.today())
-msg += "Broken upgrade path report for tags %s:\n" % ' -> '.join(tags)
+msg += "Broken upgrade path report for tags %s:\n" % ' -> '.join(cmdtags)
pkgs = badpaths.keys()
pkgs.sort()
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel