#!/usr/bin/env python
# Generate Maintainers file used by e.g. the Debian Bug Tracking System
-# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
-# $Id: charisma,v 1.15 2002-10-16 02:47:32 troup Exp $
+# Copyright (C) 2000, 2001, 2002, 2003, 2004 James Troup <james@nocrew.org>
+# $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
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 };
source_id = binary[1];
version = binary[3];
# Use the source maintainer first; falling back on the binary maintainer as a last resort only
- if source_id != 0 and source_id != None:
+ if source_id:
maintainer = get_maintainer_from_source(source_id);
else:
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 };
for filename in extra_files:
file = utils.open_file(filename);
for line in file.readlines():
- line = utils.re_comments.sub('', line[:-1]).strip();
+ line = utils.re_comments.sub('', line).strip();
if line == "":
continue;
split = line.split();
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();