new = {}
for p in current.keys():
if p in old.keys():
- if apt_pkg.VersionCompare(current[p], old[p]) > 0:
+ if apt_pkg.version_compare(current[p], old[p]) > 0:
new[p] = [current[p], old[p]]
else:
new[p] = [current[p], 0]
violations = False
for suite, version in suite_version_list:
- cmp = apt_pkg.VersionCompare(new_version, version)
+ cmp = apt_pkg.version_compare(new_version, version)
if suite in must_be_newer_than and cmp < 1:
utils.warn("%s (%s): version check violated: %s targeted at %s is *not* newer than %s in %s" % (package, architecture, new_version, target_suite, version, suite))
violations = True
cmp_package = cmp(a[0], b[0])
if cmp_package != 0:
return cmp_package
- return apt_pkg.VersionCompare(a[1], b[1])
+ return apt_pkg.version_compare(a[1], b[1])
#######################################################################################
session.execute("""INSERT INTO src_associations (suite, source)
VALUES (:suiteid, :pkid)""",
{'suiteid': suite_id, 'pkid': pkid})
+ Logger.log(["added", package, version, architecture, suite.suite_name, pkid])
+
elif action == "remove":
if association_id == None:
utils.warn("'%s_%s_%s' doesn't exist in suite %s." % (package, version, architecture, suite))
continue
else:
session.execute("""DELETE FROM src_associations WHERE id = :pkid""", {'pkid': association_id})
+ Logger.log(["removed", package, version, architecture, suite.suite_name, pkid])
else:
# Find the existing associations ID, if any
q = session.execute("""SELECT id FROM bin_associations
session.execute("""INSERT INTO bin_associations (suite, bin)
VALUES (:suiteid, :pkid)""",
{'suiteid': suite_id, 'pkid': pkid})
+ Logger.log(["added", package, version, architecture, suite.suite_name, pkid])
elif action == "remove":
if association_id == None:
utils.warn("'%s_%s_%s' doesn't exist in suite %s." % (package, version, architecture, suite))
continue
else:
session.execute("""DELETE FROM bin_associations WHERE id = :pkid""", {'pkid': association_id})
+ Logger.log(["removed", package, version, architecture, suite.suite_name, pkid])
session.commit()
cnf["Control-Suite::Options::%s" % (i)] = ""
try:
- file_list = apt_pkg.ParseCommandLine(cnf.Cnf, Arguments, sys.argv);
+ file_list = apt_pkg.parse_commandline(cnf.Cnf, Arguments, sys.argv);
except SystemError as e:
print "%s\n" % e
usage(1)
- Options = cnf.SubTree("Control-Suite::Options")
+ Options = cnf.subtree("Control-Suite::Options")
if Options["Help"]:
usage()