X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=katie.py;h=fd44215acc83b27da74c99019e0a2c52e21f086c;hb=7a48559c50812af3b8b048553e0e2d8a85685d74;hp=996ae0283fef263e5bacc98c27031e7032adc7a0;hpb=c846e77a848d60dd115f00faa0d9a854161d99eb;p=dak.git diff --git a/katie.py b/katie.py index 996ae028..fd44215a 100644 --- a/katie.py +++ b/katie.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # Utility functions for katie -# Copyright (C) 2001, 2002 James Troup -# $Id: katie.py,v 1.27 2002-10-16 02:47:32 troup Exp $ +# Copyright (C) 2001, 2002, 2003 James Troup +# $Id: katie.py,v 1.30 2003-02-21 19:19: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 @@ -460,11 +460,11 @@ distribution."""; # Ignore this; it's a common mistake and not worth whining about if section.lower() == "non-us/main" and override_section.lower() == "non-us": continue; - summary += "%s: section is overridden from %s to %s.\n" % (file, section, override_section); + summary += "%s: package says section is %s, override says %s.\n" % (file, section, override_section); priority = files[file]["priority"]; override_priority = files[file]["override priority"]; if priority != override_priority and priority != "-": - summary += "%s: priority is overridden from %s to %s.\n" % (file, priority, override_priority); + summary += "%s: package says priority is %s, override says %s.\n" % (file, priority, override_priority); if summary == "": return; @@ -475,10 +475,11 @@ distribution."""; ########################################################################### - def force_move (self, files): - """Forcefully move files from the current directory to the reject - directory. If any file already exists it will be moved to the - morgue to make way for the new file.""" + def force_reject (self, files): + """Forcefully move files from the current directory to the + reject directory. If any file already exists in the reject + directory it will be moved to the morgue to make way for + the new file.""" Cnf = self.Cnf @@ -527,10 +528,10 @@ distribution."""; while answer == 'E': os.system("%s %s" % (editor, temp_filename)) file = utils.open_file(temp_filename); - reject_message = " ".join(file.readlines()); + reject_message = "".join(file.readlines()); file.close(); print "Reject message:"; - print utils.prefix_multi_line_string(reject_message," "); + print utils.prefix_multi_line_string(reject_message," ",include_blank_lines=1); prompt = "[R]eject, Edit, Abandon, Quit ?" answer = "XXX"; while prompt.find(answer) == -1: @@ -556,7 +557,7 @@ distribution."""; # Move all the files into the reject directory reject_files = pkg.files.keys() + [pkg.changes_file]; - self.force_move(reject_files); + self.force_reject(reject_files); # If we fail here someone is probably trying to exploit the race # so let's just raise an exception ...