From: Joerg Jaspert Date: Sun, 4 Mar 2012 22:14:27 +0000 (+0100) Subject: Merge remote-tracking branch 'drkranz/misc' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=bc5df21e92f0791f1967d77b1baf66966c66f7cd;hp=438caaddbc1b10b52a19731ca01249cb6683bfc1;p=dak.git Merge remote-tracking branch 'drkranz/misc' into merge * drkranz/misc: Fix variable name in parse_checksum function (Closes: #658525) Display changes in ACCEPTED mails (Closes: #261096) When rejecting packages, make .changes files world readable (Closes: #156876) Signed-off-by: Joerg Jaspert Signed-off-by: Joerg Jaspert --- diff --git a/daklib/queue.py b/daklib/queue.py index 9d1e3866..ccb806e9 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -1933,8 +1933,7 @@ transition is done.""" # This is for direport's benefit... f = re_fdnic.sub("\n .\n", self.pkg.changes.get("changes", "")) - if byhand or new: - summary += "Changes: " + f + summary += "\n\nChanges:\n" + f summary += "\n\nOverride entries for your package:\n" + override_summary + "\n" @@ -2425,11 +2424,15 @@ distribution.""" reason_filename = self.pkg.changes_file[:-8] + ".reason" reason_filename = os.path.join(cnf["Dir::Reject"], reason_filename) + changesfile = os.path.join(cnf["Dir::Reject"], self.pkg.changes_file) # Move all the files into the reject directory reject_files = self.pkg.files.keys() + [self.pkg.changes_file] self.force_reject(reject_files) + # Change permissions of the .changes file to be world readable + os.chmod(changesfile, os.stat(changesfile).st_mode | stat.S_IROTH) + # If we fail here someone is probably trying to exploit the race # so let's just raise an exception ... if os.path.exists(reason_filename): diff --git a/daklib/utils.py b/daklib/utils.py index 5e702b04..9afd420e 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -526,8 +526,7 @@ def parse_checksums(where, files, manifest, hashname): files[checkfile][hash_key(hashname)] = checksum for f in files.keys(): if not files[f].has_key(hash_key(hashname)): - rejmsg.append("%s: no entry in checksums-%s in %s" % (checkfile, - hashname, where)) + rejmsg.append("%s: no entry in checksums-%s in %s" % (f, hashname, where)) return rejmsg ################################################################################