Cnf = daklib.utils.get_conf()
- Arguments = [('h',"help","Dinstall::Options::Help"),
- ('n',"no-action","Dinstall::Options::No-Action")]
+ Arguments = [('h',"help","Check-Transitions::Options::Help"),
+ ('n',"no-action","Check-Transitions::Options::No-Action")]
for i in ["help", "no-action"]:
- Cnf["Dinstall::Options::%s" % (i)] = ""
+ if not Cnf.has_key("Check-Transitions::Options::%s" % (i)):
+ Cnf["Check-Transitions::Options::%s" % (i)] = ""
+
+ apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv)
+
+ Options = Cnf.SubTree("Check-Transitions::Options")
projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
daklib.database.init(Cnf, projectB)
- Options = Cnf.SubTree("Dinstall::Options")
- if Options["Help"]:
+ if Options["help"]:
usage()
################################################################################
def usage (exit_code=0):
print """Usage: check_transitions [OPTION]...
- Check the release managers transition file for correctness and outdated transitions
+ Check the release managers transition file for correctness and outdated transitions
-h, --help show this help and exit.
-n, --no-action don't do anything"""
sys.exit(exit_code)
Source: %s
New Version: %s
Responsible: %s
- Reason: %s
+ Description: %s
Blocked Packages (total: %d): %s
""" % (trans, source, new_vers, t["rm"], t["reason"], len(t["packages"]), ", ".join(t["packages"]))
- if curvers and apt_pkg.VersionCompare(new_vers, curvers) == 1:
- # This is still valid, the current version in database is older than
- # the new version we wait for
- print "This transition is still ongoing"
+ if curvers == None:
+ # No package in testing
+ print "Transition source %s not in testing, transition still ongoing." % (source)
else:
- print "This transition is over, the target package reached testing, removing"
- print "%s wanted version: %s, has %s" % (source, new_vers, curvers)
- to_remove.append(trans)
- to_dump = 1
+ compare = apt_pkg.VersionCompare(curvers, new_vers)
+ print "Apt compare says: %s" % (compare)
+ if compare < 0:
+ # This is still valid, the current version in database is older than
+ # the new version we wait for
+ print "This transition is still ongoing, we currently have version %s" % (curvers)
+ else:
+ print "This transition is over, the target package reached testing, removing"
+ print "%s wanted version: %s, has %s" % (source, new_vers, curvers)
+ to_remove.append(trans)
+ to_dump = 1
print "-------------------------------------------------------------------------"
if to_dump:
for remove in to_remove:
- if Options["No-Action"]:
+ if Options["no-action"]:
print "I: I would remove the %s transition" % (remove)
else:
del transitions[remove]
- if not Options["No-Action"]:
+ if not Options["no-action"]:
destfile = file(Cnf["Dinstall::Reject::ReleaseTransitions"], 'w')
dump(transitions, destfile)
# Will be None if nothing is in testing.
curvers = daklib.database.get_testing_version(source)
+ if not curvers == None:
+ compare = apt_pkg.VersionCompare(curvers, new_vers)
- if curvers and apt_pkg.VersionCompare(new_vers, curvers) == 1:
- # This is still valid, the current version in database is older than
- # the new version we wait for
+ if curvers == None or compare < 0:
+ # This is still valid, the current version in testing is older than
+ # the new version we wait for, or there is none in testing yet
# Check if the source we look at is affected by this.
if sourcepkg in t['packages']:
Package: dak
Architecture: any
-Depends: ${python:Depends}, python-pygresql, python2.1-email | python (>= 2.2), python-apt, apt-utils, gnupg (>= 1.0.6-1), ${shlibs:Depends}, dpkg-dev
+Depends: ${python:Depends}, python-pygresql, python2.1-email | python (>= 2.2), python-apt, apt-utils, gnupg (>= 1.0.6-1), ${shlibs:Depends}, dpkg-dev, python-syck (>= 0.61.2-1)
Suggests: lintian, linda, less, binutils-multiarch, symlinks, postgresql (>= 7.1.0), dsync
Description: Debian's archive maintenance scripts
This is a collection of archive maintenance scripts used by the