X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=ccb806e939193f792cb4bce4495a1651386304ba;hb=18405d5895036334ecc86a6db6f2eb22dbdc798a;hp=b7c2249ee3fb0868e8c5ea5fbd1c2c6100b7b1c0;hpb=f4a53b256d1295d471569af5d66401401cf78cc8;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index b7c2249e..ccb806e9 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -290,9 +290,9 @@ class TarTime(object): def callback(self, member, data): if member.mtime > self.future_cutoff: - self.future_files[Name] = MTime + self.future_files[Name] = member.mtime if member.mtime < self.past_cutoff: - self.ancient_files[Name] = MTime + self.ancient_files[Name] = member.mtime ############################################################################### @@ -1657,6 +1657,9 @@ class Upload(object): self.rejects.append("%s: deb contents timestamp check failed [%s: %s]" % (filename, sys.exc_info()[0], sys.exc_info()[1])) def check_if_upload_is_sponsored(self, uid_email, uid_name): + for key in "maintaineremail", "changedbyemail", "maintainername", "changedbyname": + if not self.pkg.changes.has_key(key): + return False uid_email = '@'.join(uid_email.split('@')[:2]) if uid_email in [self.pkg.changes["maintaineremail"], self.pkg.changes["changedbyemail"]]: sponsored = False @@ -1930,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" @@ -2422,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):