X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=c30aeb0566853c6de967416fe8049a1d9bd71936;hb=b7d36f712210b0efac983da88ae91cdd3fd7f469;hp=7165f588af942c8d32d0c1cad86881629edec50c;hpb=e972a8e0d1fb930c6f1e51b0d3fc6e1688a2e7f0;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 7165f588..c30aeb05 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -26,7 +26,6 @@ Queue utility functions for dak ############################################################################### -import cPickle import errno import os import pg @@ -1070,7 +1069,7 @@ class Upload(object): (result, output) = commands.getstatusoutput(cmd) if (result != 0): self.rejects.append("'dpkg-source -x' failed for %s [return code: %s]." % (dsc_filename, result)) - self.rejects.append(utils.prefix_multi_line_string(output, " [dpkg-source output:] "), "") + self.rejects.append(utils.prefix_multi_line_string(output, " [dpkg-source output:] ")) return if not cnf.Find("Dir::Queue::BTSVersionTrack"): @@ -1209,7 +1208,7 @@ class Upload(object): return cnf = Config() - tagfile = cnf("Dinstall::LintianTags") + tagfile = cnf["Dinstall::LintianTags"] # Parse the yaml file sourcefile = file(tagfile, 'r') sourcecontent = sourcefile.read() @@ -1238,13 +1237,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 @@ -1280,7 +1278,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): @@ -1735,7 +1733,7 @@ distribution.""" # 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)