X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lisa;h=22341b849751f19ac14b5a2c60fd955e68565532;hb=69f4a78e5ed8774bcb8dad17fc8f17d54971bfde;hp=45c500f677296c2880c71ae10d3d1906664c1088;hpb=57663cee3f2c0e03c6215b8b27a3d4d613128f6a;p=dak.git diff --git a/lisa b/lisa index 45c500f6..22341b84 100755 --- a/lisa +++ b/lisa @@ -2,7 +2,7 @@ # Handles NEW and BYHAND packages # Copyright (C) 2001, 2002 James Troup -# $Id: lisa,v 1.12 2002-05-19 02:00:48 troup Exp $ +# $Id: lisa,v 1.13 2002-05-19 19:55:56 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 @@ -58,7 +58,7 @@ import apt_pkg, apt_inst; import db_access, fernanda, katie, logging, utils; # Globals -lisa_version = "$Revision: 1.12 $"; +lisa_version = "$Revision: 1.13 $"; Cnf = None; Options = None; @@ -141,25 +141,28 @@ def determine_new (changes, files): def changes_compare (a, b): try: - a_changes = utils.parse_changes(a); + Katie.pkg.changes_file = a; + Katie.init_vars(); + Katie.update_vars(); + a_changes = copy.copy(Katie.pkg.changes); except: return 1; try: - b_changes = utils.parse_changes(b); + Katie.pkg.changes_file = b; + Katie.init_vars(); + Katie.update_vars(); + b_changes = copy.copy(Katie.pkg.changes); except: return -1; - utils.cc_fix_changes (a_changes); - utils.cc_fix_changes (b_changes); - # Sort by 'have note'; a_has_note = a_changes.get("lisa note"); b_has_note = b_changes.get("lisa note"); if a_has_note and not b_has_note: - return -1; - elif b_has_note and not a_has_note: return 1; + elif b_has_note and not a_has_note: + return -1; # Sort by 'have source' a_has_source = a_changes["architecture"].get("source"); @@ -795,6 +798,8 @@ def end(): def main(): changes_files = init(); + if len(changes_files) > 50: + sys.stderr.write("Sorting changes...\n"); changes_files.sort(changes_compare); # Kill me now? **FIXME**