###############################################################################
+# 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'
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
# 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"
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):