# Handles NEW and BYHAND packages
# Copyright (C) 2001, 2002 James Troup <james@nocrew.org>
-# $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
import db_access, fernanda, katie, logging, utils;
# Globals
-lisa_version = "$Revision: 1.12 $";
+lisa_version = "$Revision: 1.13 $";
Cnf = None;
Options = None;
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");
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**