]> git.decadent.org.uk Git - dak.git/blobdiff - charisma
fix typos in init_pool.sql-security
[dak.git] / charisma
index cc92de44917dcbbf6bce6fc5f9f599780ee31f97..b9eae14704e14783a07bb08a835b8e5e58abb3a1 100755 (executable)
--- a/charisma
+++ b/charisma
@@ -1,8 +1,8 @@
 #!/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
@@ -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 };
@@ -117,13 +117,13 @@ def main():
             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 };
@@ -132,7 +132,7 @@ def main():
     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();
@@ -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();