]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Merge branch 'merge'
[dak.git] / daklib / queue.py
index 4e5368770d52ff3565c34e7fe37469458155c7a0..1d2a3275fc43ac8f29d062affa974a3f3efc6d6f 100755 (executable)
@@ -1208,7 +1208,10 @@ class Upload(object):
             return
 
         cnf = Config()
-        tagfile = cnf("Dinstall::LintianTags")
+        tagfile = cnf.get("Dinstall::LintianTags")
+        if tagfile is None:
+            # We don't have a tagfile, so just don't do anything.
+            return
         # Parse the yaml file
         sourcefile = file(tagfile, 'r')
         sourcecontent = sourcefile.read()
@@ -1237,13 +1240,12 @@ class Upload(object):
         # So now we should look at running lintian at the .changes file, capturing output
         # to then parse it.
         command = "lintian --show-overrides --tags-from-file %s %s" % (temp_filename, self.pkg.changes_file)
-        (result, output) = commands.getstatusoutput(cmd)
+        (result, output) = commands.getstatusoutput(command)
         # We are done with lintian, remove our tempfile
         os.unlink(temp_filename)
-        if (result != 0):
-            self.rejects.append("lintian failed for %s [return code: %s]." % (self.pkg.changes_file, result))
-            self.rejects.append(utils.prefix_multi_line_string(output, " [possible output:] "))
-            return
+        if (result == 2):
+            utils.warn("lintian failed for %s [return code: %s]." % (self.pkg.changes_file, result))
+            utils.warn(utils.prefix_multi_line_string(output, " [possible output:] "))
 
         if len(output) == 0:
             return
@@ -1279,7 +1281,7 @@ class Upload(object):
                 self.rejects.append("%s: Found lintian output: '%s %s', automatically rejected package." % (epackage, etag, etext))
                 # Now tell if they *might* override it.
                 if etag in lintiantags['warning']:
-                    self.rejects.append("%s: If you have a good reason, you may override this lintian tag. Laziness to fix your crap is NOT A GOOD REASON, sod off" % (epackage))
+                    self.rejects.append("%s: If you have a good reason, you may override this lintian tag." % (epackage))
 
     ###########################################################################
     def check_urgency(self):
@@ -1734,7 +1736,7 @@ distribution."""
         # <Ganneff> yes
 
         # This routine returns None on success or an error on failure
-        res = get_queue('accepted').autobuild_upload(self.pkg, cnf["Dir::Queue::Accepted"])
+        res = get_or_set_queue('accepted').autobuild_upload(self.pkg, cnf["Dir::Queue::Accepted"])
         if res:
             utils.fubar(res)
 
@@ -1916,7 +1918,7 @@ distribution."""
         if not manual:
             self.Subst["__REJECTOR_ADDRESS__"] = cnf["Dinstall::MyEmailAddress"]
             self.Subst["__MANUAL_REJECT_MESSAGE__"] = ""
-            self.Subst["__CC__"] = "X-DAK-Rejection: automatic (moo)\nX-Katie-Rejection: automatic (moo)"
+            self.Subst["__CC__"] = "X-DAK-Rejection: automatic (moo)"
             os.write(reason_fd, reject_message)
             reject_mail_message = utils.TemplateSubst(self.Subst, rej_template)
         else:
@@ -2334,7 +2336,7 @@ distribution."""
         self.Subst["__REJECTOR_ADDRESS__"] = cnf["Dinstall::MyEmailAddress"]
         self.Subst["__REJECT_MESSAGE__"] = self.package_info()
         self.Subst["__CC__"] = "Cc: " + cnf["Dinstall::MyEmailAddress"]
-        self.Subst["__BCC__"] = "X-DAK: dak process-accepted\nX-Katie: $Revision: 1.18 $"
+        self.Subst["__BCC__"] = "X-DAK: dak process-accepted"
         if cnf.has_key("Dinstall::Bcc"):
             self.Subst["__BCC__"] += "\nBcc: %s" % (cnf["Dinstall::Bcc"])