From 3753845df4172f85764a55ac5e24ba0c626799ce Mon Sep 17 00:00:00 2001 From: James Troup Date: Thu, 17 Jun 2004 15:02:02 +0000 Subject: [PATCH] 2004-06-10 James Troup * katie.py (Katie.cross_suite_version_check): post-woody versions of python-apt's apt_pkg.VersionCompare() function apparently returns variable integers for less than or greater than results - update our result checking to match. * jenna (resolve_arch_all_vs_any): likewise. * charisma (main): likewise. --- charisma | 8 ++++---- jenna | 4 ++-- katie.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charisma b/charisma index 9638d893..b9eae147 100755 --- a/charisma +++ b/charisma @@ -2,7 +2,7 @@ # Generate Maintainers file used by e.g. the Debian Bug Tracking System # Copyright (C) 2000, 2001, 2002, 2003, 2004 James Troup -# $Id: charisma,v 1.17 2004-03-11 00:20:51 troup Exp $ +# $Id: charisma,v 1.18 2004-06-17 15:02:02 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -104,7 +104,7 @@ def main(): maintainer = fix_maintainer(source[2]); if packages.has_key(package): if packages[package]["priority"] <= suite_priority: - if apt_pkg.VersionCompare(packages[package]["version"], version) == -1: + if apt_pkg.VersionCompare(packages[package]["version"], version) < 0: packages[package] = { "maintainer": maintainer, "priority": suite_priority, "version": version }; else: packages[package] = { "maintainer": maintainer, "priority": suite_priority, "version": version }; @@ -123,7 +123,7 @@ def main(): maintainer = get_maintainer(binary[2]); if packages.has_key(package): if packages[package]["priority"] <= suite_priority: - if apt_pkg.VersionCompare(packages[package]["version"], version) == -1: + if apt_pkg.VersionCompare(packages[package]["version"], version) < 0: packages[package] = { "maintainer": maintainer, "priority": suite_priority, "version": version }; else: packages[package] = { "maintainer": maintainer, "priority": suite_priority, "version": version }; @@ -145,7 +145,7 @@ def main(): version = '*'; # A version of '*' overwhelms all real version numbers if not packages.has_key(package) or version == '*' \ - or apt_pkg.VersionCompare(packages[package]["version"], version) == -1: + or apt_pkg.VersionCompare(packages[package]["version"], version) < 0: packages[package] = { "maintainer": maintainer, "version": version }; file.close(); diff --git a/jenna b/jenna index dde4388d..7e7f2f36 100755 --- a/jenna +++ b/jenna @@ -2,7 +2,7 @@ # Generate file lists used by apt-ftparchive to generate Packages and Sources files # Copyright (C) 2000, 2001, 2002, 2003, 2004 James Troup -# $Id: jenna,v 1.27 2004-02-27 20:07:40 troup Exp $ +# $Id: jenna,v 1.28 2004-06-17 15:02:02 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -117,7 +117,7 @@ def resolve_arch_all_vs_any(versions, packages): delete_table = "bin_associations"; delete_col = "bin"; - if apt_pkg.VersionCompare(highest_arch_any_version, arch_all_version) != 1: + if apt_pkg.VersionCompare(highest_arch_any_version, arch_all_version) < 1: # arch: all dominates delete_packages(arch_any_versions, pkg, "all", suite, arch_all_version, delete_table, delete_col, packages); diff --git a/katie.py b/katie.py index 0078e39e..b6428d4c 100644 --- a/katie.py +++ b/katie.py @@ -2,7 +2,7 @@ # Utility functions for katie # Copyright (C) 2001, 2002, 2003, 2004 James Troup -# $Id: katie.py,v 1.47 2004-04-07 00:12:13 troup Exp $ +# $Id: katie.py,v 1.48 2004-06-17 15:02:02 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -775,10 +775,10 @@ distribution."""; existent_version = entry[0]; suite = entry[1]; if suite in must_be_newer_than and \ - apt_pkg.VersionCompare(new_version, existent_version) != 1: + apt_pkg.VersionCompare(new_version, existent_version) < 1: self.reject("%s: old version (%s) in %s >= new version (%s) targeted at %s." % (file, existent_version, suite, new_version, target_suite)); if suite in must_be_older_than and \ - apt_pkg.VersionCompare(new_version, existent_version) != -1: + apt_pkg.VersionCompare(new_version, existent_version) > -1: self.reject("%s: old version (%s) in %s <= new version (%s) targeted at %s." % (file, existent_version, suite, new_version, target_suite)); ################################################################################ -- 2.39.5