]> git.decadent.org.uk Git - dak.git/blobdiff - lisa
add optional prompt argument to our_raw_input; use it.
[dak.git] / lisa
diff --git a/lisa b/lisa
index 7d600f1da72831f0738249d844c1cfc6e687bb8d..ab94ed4f03e2ac308b029c60182b7985aacf37da 100755 (executable)
--- a/lisa
+++ b/lisa
@@ -2,7 +2,7 @@
 
 # Handles NEW and BYHAND packages
 # Copyright (C) 2001  James Troup <james@nocrew.org>
-# $Id: lisa,v 1.1 2002-02-12 23:08:07 troup Exp $
+# $Id: lisa,v 1.3 2002-02-22 01:03:07 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.1 $";
+lisa_version = "$Revision: 1.3 $";
 
 Cnf = None;
 Options = None;
@@ -107,6 +107,8 @@ def determine_new (changes, files):
                     new[pkg]["type"] = type;
                     new[pkg]["component"] = component;
         new[pkg]["files"].append(file);
+        if f.has_key("othercomponents"):
+            new[pkg]["othercomponents"] = f["othercomponents"];
 
     for suite in changes["distribution"].keys():
         suite_id = db_access.get_suite_id(suite);
@@ -131,12 +133,12 @@ def changes_compare_by_time (a, b):
     try:
         a_changes = utils.parse_changes(a, 0)
     except:
-        return -1;
+        return 1;
 
     try:
         b_changes = utils.parse_changes(b, 0)
     except:
-        return 1;
+        return -1;
 
     utils.cc_fix_changes (a_changes);
     utils.cc_fix_changes (b_changes);
@@ -257,6 +259,8 @@ def print_new (new, indexed, file=sys.stdout):
         else:
             line = "%-20s %-20s %-20s" % (pkg, priority, section);
         line = string.strip(line)+'\n';
+        if new[pkg].has_key("othercomponents"):
+            line = line + "WARNING: Already present in %s distribution.\n" % (new[pkg]["othercomponents"]);
         file.write(line);
     return ret_code;