X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=ea8f676aa66ea9e68003be4e9f3481835ecdc487;hb=bf41f725ad73cb98ec7295ad1006e92dcccf380b;hp=13409eb4d96effc89e750ec17c1d5366c8b9711d;hpb=5ea129bba83114905c1266b77744eeed8e9bb020;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 13409eb4..ea8f676a 100644 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -31,6 +31,7 @@ re_isanum = re.compile (r"^\d+$") re_default_answer = re.compile(r"\[(.*)\]") re_fdnic = re.compile(r"\n\n") re_bin_only_nmu = re.compile(r"\+b\d+$") + ############################################################################### # Convenience wrapper to carry around all the package information in @@ -174,7 +175,7 @@ class Upload: "closes", "changes" ]: d_changes[i] = changes[i] # Optional changes fields - for i in [ "changed-by", "filecontents", "format", "process-new note", "distribution-version" ]: + for i in [ "changed-by", "filecontents", "format", "process-new note", "adv id", "distribution-version" ]: if changes.has_key(i): d_changes[i] = changes[i] ## dsc @@ -251,6 +252,7 @@ class Upload: if not changes.has_key("distribution") or not isinstance(changes["distribution"], DictType): changes["distribution"] = {} + override_summary =""; file_keys = files.keys() file_keys.sort() for file in file_keys: @@ -270,6 +272,8 @@ class Upload: files[file]["pool name"] = utils.poolify (changes.get("source",""), files[file]["component"]) destination = self.Cnf["Dir::PoolRoot"] + files[file]["pool name"] + file summary += file + "\n to " + destination + "\n" + if files[file]["type"] in ["deb", "udeb", "dsc"]: + override_summary += "%s - %s %s\n" % (file, files[file]["priority"], files[file]["section"]) short_summary = summary @@ -279,6 +283,8 @@ class Upload: if byhand or new: summary += "Changes: " + f + summary += "\n\nOverride entries for your package:\n" + override_summary + "\n" + summary += self.announce(short_summary, 0) return (summary, short_summary) @@ -644,9 +650,9 @@ distribution.""" if not manual: Subst["__REJECTOR_ADDRESS__"] = Cnf["Dinstall::MyEmailAddress"] Subst["__MANUAL_REJECT_MESSAGE__"] = "" - Subst["__CC__"] = "X-DAK-Rejection: automatic (moo)" + Subst["__CC__"] = "X-DAK-Rejection: automatic (moo)\nX-Katie-Rejection: automatic (moo)" os.write(reason_fd, reject_message) - reject_mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/dak.rejected") + reject_mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/queue.rejected") else: # Build up the rejection email user_email_address = utils.whoami() + " <%s>" % (Cnf["Dinstall::MyAdminAddress"]) @@ -654,7 +660,7 @@ distribution.""" Subst["__REJECTOR_ADDRESS__"] = user_email_address Subst["__MANUAL_REJECT_MESSAGE__"] = reject_message Subst["__CC__"] = "Cc: " + Cnf["Dinstall::MyEmailAddress"] - reject_mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/dak.rejected") + reject_mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/queue.rejected") # Write the rejection email out as the .reason file os.write(reason_fd, reject_mail_message) @@ -695,7 +701,7 @@ distribution.""" if x[1] in s and x[0] not in s: s.append(x[0]) - que = "SELECT s.version FROM source s JOIN src_associations sa ON (s.id = sa.source) JOIN suite su ON (sa.suite = su.id) WHERE s.source = '%s' AND (%s)" % (package, string.join(["su.suite_name = '%s'" % a for a in s], " OR ")) + que = "SELECT s.version FROM source s JOIN src_associations sa ON (s.id = sa.source) JOIN suite su ON (sa.suite = su.id) WHERE s.source = '%s' AND (%s)" % (package, " OR ".join(["su.suite_name = '%s'" % a for a in s])) q = self.projectB.query(que) # Reduce the query results to a list of version numbers @@ -774,7 +780,7 @@ distribution.""" anyversion=None anysuite = [suite] + self.Cnf.ValueList("Suite::%s::VersionChecks::Enhances" % (suite)) for (v, s) in query_result: - if s in [ string.lower(x) for x in anysuite ]: + if s in [ x.lower() for x in anysuite ]: if not anyversion or apt_pkg.VersionCompare(anyversion, v) <= 0: anyversion=v return anyversion