from textutils import fix_maintainer
from lintian import parse_lintian_output, generate_reject_messages
from contents import UnpackedSource
from textutils import fix_maintainer
from lintian import parse_lintian_output, generate_reject_messages
from contents import UnpackedSource
- for package, entry in build_package_set(dsc, session).items():
- if not new.has_key(package):
+ for package, entry in build_package_list(dsc, session).items():
+ if package not in new:
def callback(self, member, data):
if member.mtime > self.future_cutoff:
def callback(self, member, data):
if member.mtime > self.future_cutoff:
self.rejects.append("%s: has %s file(s) with a time stamp too ancient (e.g. %s [%s])."
% (filename, num_ancient_files, ancient_file, time.ctime(ancient_date)))
except:
self.rejects.append("%s: has %s file(s) with a time stamp too ancient (e.g. %s [%s])."
% (filename, num_ancient_files, ancient_file, time.ctime(ancient_date)))
except:
- self.rejects.append("%s: deb contents timestamp check failed [%s: %s]" % (filename, sys.exc_type, sys.exc_value))
+ self.rejects.append("%s: deb contents timestamp check failed [%s: %s]" % (filename, sys.exc_info()[0], sys.exc_info()[1]))
uid_email = '@'.join(uid_email.split('@')[:2])
if uid_email in [self.pkg.changes["maintaineremail"], self.pkg.changes["changedbyemail"]]:
sponsored = False
uid_email = '@'.join(uid_email.split('@')[:2])
if uid_email in [self.pkg.changes["maintaineremail"], self.pkg.changes["changedbyemail"]]:
sponsored = False
# This is for direport's benefit...
f = re_fdnic.sub("\n .\n", self.pkg.changes.get("changes", ""))
# This is for direport's benefit...
f = re_fdnic.sub("\n .\n", self.pkg.changes.get("changes", ""))
filename = "%s/%s" % (cnf["Dir::BTSVersionTrack"],
self.pkg.changes_file[:-8]+".versions")
os.rename(temp_filename, filename)
filename = "%s/%s" % (cnf["Dir::BTSVersionTrack"],
self.pkg.changes_file[:-8]+".versions")
os.rename(temp_filename, filename)
# Write out the binary -> source mapping.
(fd, temp_filename) = utils.temp_filename(cnf["Dir::BTSVersionTrack"], prefix=".")
# Write out the binary -> source mapping.
(fd, temp_filename) = utils.temp_filename(cnf["Dir::BTSVersionTrack"], prefix=".")
filename = "%s/%s" % (cnf["Dir::BTSVersionTrack"],
self.pkg.changes_file[:-8]+".debinfo")
os.rename(temp_filename, filename)
filename = "%s/%s" % (cnf["Dir::BTSVersionTrack"],
self.pkg.changes_file[:-8]+".debinfo")
os.rename(temp_filename, filename)
- utils.move(file_entry, dest_file, 1, perms=0660)
+ utils.move(file_entry, dest_file, 1, perms=0o660)
reason_filename = self.pkg.changes_file[:-8] + ".reason"
reason_filename = os.path.join(cnf["Dir::Reject"], reason_filename)
reason_filename = self.pkg.changes_file[:-8] + ".reason"
reason_filename = os.path.join(cnf["Dir::Reject"], reason_filename)
# Move all the files into the reject directory
reject_files = self.pkg.files.keys() + [self.pkg.changes_file]
self.force_reject(reject_files)
# Move all the files into the reject directory
reject_files = self.pkg.files.keys() + [self.pkg.changes_file]
self.force_reject(reject_files)
# 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):
os.unlink(reason_filename)
# 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):
os.unlink(reason_filename)