missing = handler.missing_overrides(hints=missing)
broken = not check_valid(missing, session)
+ changesname = os.path.basename(upload.changes.changesname)
+
+ print
+ print changesname
+ print "-" * len(changesname)
+ print
+ print " Target: {0}".format(upload.target_suite.suite_name)
+ print " Changed-By: {0}".format(upload.changes.changedby)
+ print
+
#if len(byhand) == 0 and len(missing) == 0:
# break
continue
if answer == 'A' and not Options["Trainee"]:
- try:
- check_daily_lock()
- add_overrides(missing, upload.target_suite, session)
- if Config().find_b("Dinstall::BXANotify"):
- do_bxa_notification(missing, upload, session)
- handler.accept()
- done = True
- Logger.log(["NEW ACCEPT", upload.changes.changesname])
- except CantGetLockError:
- print "Hello? Operator! Give me the number for 911!"
- print "Dinstall in the locked area, cant process packages, come back later"
+ add_overrides(missing, upload.target_suite, session)
+ if Config().find_b("Dinstall::BXANotify"):
+ do_bxa_notification(missing, upload, session)
+ handler.accept()
+ done = True
+ Logger.log(["NEW ACCEPT", upload.changes.changesname])
elif answer == 'C':
check_pkg(upload, upload_copy, session)
elif answer == 'E' and not Options["Trainee"]:
-h, --help show this help and exit.
-m, --manual-reject=MSG manual reject with `msg'
-n, --no-action don't do anything
+ -q, --queue=QUEUE operate on a different queue
-t, --trainee FTP Trainee mode
-V, --version display the version number and exit
################################################################################
-def check_daily_lock():
- """
- Raises CantGetLockError if the dinstall daily.lock exists.
- """
-
- cnf = Config()
- try:
- lockfile = cnf.get("Process-New::DinstallLockFile",
- os.path.join(cnf['Dir::Lock'], 'processnew.lock'))
-
- os.open(lockfile,
- os.O_RDONLY | os.O_CREAT | os.O_EXCL)
- except OSError as e:
- if e.errno == errno.EEXIST or e.errno == errno.EACCES:
- raise CantGetLockError
-
- os.unlink(lockfile)
-
@contextlib.contextmanager
def lock_package(package):
"""
dsc = upload.source
cnf = Config()
+ group = cnf.get('Dinstall::UnprivGroup') or None
+
#bcc = "X-DAK: dak process-new"
#if cnf.has_key("Dinstall::Bcc"):
# u.Subst["__BCC__"] = bcc + "\nBcc: %s" % (cnf["Dinstall::Bcc"])
try:
with lock_package(upload.changes.source):
- with UploadCopy(upload) as upload_copy:
+ with UploadCopy(upload, group=group) as upload_copy:
handler = PolicyQueueUploadHandler(upload, session)
if handler.get_action() is not None:
print "PENDING %s\n" % handler.get_action()
show_new_comments(uploads, session)
else:
for upload in uploads:
- print "\n" + os.path.basename(upload.changes.changesname)
-
do_pkg (upload, session)
end()