提交 3753845d 编写于 作者: J James Troup

2004-06-10 James Troup <james@nocrew.org> * katie.py...

2004-06-10  James Troup  <james@nocrew.org>	* 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.
上级 b67c5d00
......@@ -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 <james@nocrew.org>
# $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();
......
......@@ -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 <james@nocrew.org>
# $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);
......
......@@ -2,7 +2,7 @@
# Utility functions for katie
# Copyright (C) 2001, 2002, 2003, 2004 James Troup <james@nocrew.org>
# $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));
################################################################################
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册