X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=daklib%2Fqueue.py;h=e2ab8467b66ec7901e967e68e0ce513dd24dd8fa;hb=0873d6309f8352ffd4331ec373b10dc737b4dfb3;hp=85c85f92b9701901eeeae9c077c588094d8173fc;hpb=4637f18bcbe076ac9e9bf7d9e5812819f2c5f2e4;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 85c85f92..e2ab8467 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -386,8 +386,9 @@ def edit_note(note, upload, session, trainee=False): ############################################################################### +# FIXME: Should move into the database # suite names DMs can upload to -dm_suites = ['unstable', 'experimental'] +dm_suites = ['unstable', 'experimental', 'squeeze-backports'] def get_newest_source(source, session): 'returns the newest DBSource object in dm_suites' @@ -1807,7 +1808,7 @@ class Upload(object): r = get_newest_source(self.pkg.changes["source"], session) if r is None: - rej = "Could not find existing source package %s in unstable or experimental and this is a DM upload" % self.pkg.changes["source"] + rej = "Could not find existing source package %s in the DM allowed suites and this is a DM upload" % self.pkg.changes["source"] self.rejects.append(rej) return @@ -1933,8 +1934,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" @@ -2432,7 +2432,12 @@ distribution.""" 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) + try: + os.chmod(changesfile, os.stat(changesfile).st_mode | stat.S_IROTH) + except OSError as (errno, strerror): + # Ignore 'Operation not permitted' error. + if errno != 1: + raise # If we fail here someone is probably trying to exploit the race # so let's just raise an exception ...