X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=31f9a25be9e48e5f34ea59d3d6743f539338825e;hb=8154d2b22cb56511e95f9b7e2a61a94bfb3e905f;hp=0c79a260be58fbe04e1dab92bd0de1d2aae74828;hpb=9ed6fde4653fe17070892a6be3fccc755f9ca204;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 0c79a260..31f9a25b 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -1025,7 +1025,7 @@ class Upload(object): ########################################################################### - def ensure_all_source_exists(self, dest_dir=None): + def ensure_all_source_exists(self, source_dir, dest_dir=None): """ Ensure that dest_dir contains all the orig tarballs for the specified changes. If it does not, symlink them into place. @@ -1045,10 +1045,10 @@ class Upload(object): if not os.path.exists(src): return ftype = m.group(3) - if re_is_orig_source.match(f) and pkg.orig_files.has_key(f) and \ - pkg.orig_files[f].has_key("path"): + if re_is_orig_source.match(f) and self.pkg.orig_files.has_key(f) and \ + self.pkg.orig_files[f].has_key("path"): continue - dest = os.path.join(os.getcwd(), f) + dest = os.path.join(dest_dir, f) os.symlink(src, dest) # If the orig files are not a part of the upload, create symlinks to the @@ -1077,7 +1077,7 @@ class Upload(object): if not dsc_filename: return - self.ensure_all_source_exists() + self.ensure_all_source_exists(source_dir) # Extract the source cmd = "dpkg-source -sn -x %s" % (dsc_filename) @@ -1225,7 +1225,10 @@ class Upload(object): self.ensure_all_source_exists() 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() @@ -1264,6 +1267,12 @@ class Upload(object): if len(output) == 0: return + def log(*txt): + if self.logger: + args = [self.pkg.changes_file, "check_lintian"] + args.extend(txt) + self.logger.log(args) + # We have output of lintian, this package isn't clean. Lets parse it and see if we # are having a victim for a reject. # W: tzdata: binary-without-manpage usr/sbin/tzconfig @@ -1290,9 +1299,11 @@ class Upload(object): elif etag in lintiantags['error']: # The tag is overriden - but is not allowed to be self.rejects.append("%s: Overriden tag %s found, but this tag may not be overwritten." % (epackage, etag)) + log("overidden tag is overridden", etag) else: # Tag is known, it is not overriden, direct reject. self.rejects.append("%s: Found lintian output: '%s %s', automatically rejected package." % (epackage, etag, etext)) + log("auto rejecting", etag) # 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." % (epackage)) @@ -1932,7 +1943,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: @@ -2350,7 +2361,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"])