]> git.decadent.org.uk Git - dak.git/blobdiff - katie
new function to check for packages being on arches they shouldn't
[dak.git] / katie
diff --git a/katie b/katie
index 410871dd52e9f4d93036f936a41aece962b27c29..961476c7082a201b33cc96ec48d8e9202b0c30e5 100755 (executable)
--- a/katie
+++ b/katie
@@ -2,7 +2,7 @@
 
 # Installs Debian packaes
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: katie,v 1.34 2001-03-21 05:37:23 troup Exp $
+# $Id: katie,v 1.37 2001-04-03 21:28:20 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
@@ -626,16 +626,18 @@ def check_override ():
 
 def update_subst (changes_filename):
     global Subst;
-    
+
     if changes.has_key("architecture"):
         Subst["__ARCHITECTURE__"] = string.join(changes["architecture"].keys(), ' ' );
+    else:
+        Subst["__ARCHITECTURE__"] = "Unknown";
     Subst["__CHANGES_FILENAME__"] = os.path.basename(changes_filename);
-    Subst["__FILE_CONTENTS__"] = changes.get("filecontents");
+    Subst["__FILE_CONTENTS__"] = changes.get("filecontents", "");
     Subst["__MAINTAINER_ADDRESS__"] = changes["maintainer822"];
-    Subst["__MAINTAINER__"] = changes.get("maintainer");
+    Subst["__MAINTAINER__"] = changes.get("maintainer", "Unknown");
     Subst["__REJECT_MESSAGE__"] = reject_message;
-    Subst["__SOURCE__"] = changes.get("source");
-    Subst["__VERSION__"] = changes.get("version");
+    Subst["__SOURCE__"] = changes.get("source", "Unknown");
+    Subst["__VERSION__"] = changes.get("version", "Unknown");
 
 #####################################################################################################################
 
@@ -685,7 +687,11 @@ def action (changes_filename):
         answer = 'S'
 
     if string.find(reject_message, "Rejected") != -1:
-        if time.time()-os.path.getmtime(changes_filename) < 86400:
+        try:
+            modified_time = time.time()-os.path.getmtime(changes_filename);
+        except: # i.e. ignore errors like 'file does not exist';
+            modified_time = 0;
+        if modified_time < 86400:
             print "SKIP (too new)\n" + reject_message,;
             prompt = "[S]kip, Manual reject, Quit ?";
         else:
@@ -958,7 +964,7 @@ def stable_install (changes_filename, summary, short_summary):
     install_count = install_count + 1;
 
     if not Cnf["Dinstall::Options::No-Mail"]:
-        Subst["__SUITE__"] = "into stable";
+        Subst["__SUITE__"] = " into stable";
         Subst["__SUMMARY__"] = summary;
         utils.send_mail (mail_message, "")
         announce (short_summary, 1)
@@ -1228,7 +1234,7 @@ def main():
     Subst = {}
     Subst["__ADMIN_ADDRESS__"] = Cnf["Dinstall::MyAdminAddress"];
     Subst["__BUG_SERVER__"] = Cnf["Dinstall::BugServer"];
-    bcc = "X-Katie: $Revision: 1.34 $"
+    bcc = "X-Katie: $Revision: 1.37 $"
     if Cnf.has_key("Dinstall::Bcc"):
         Subst["__BCC__"] = bcc + "\nBcc: %s" % (Cnf["Dinstall::Bcc"]);
     else: