if upload.source is not None:
transaction.copy_source(upload.source, suite, source_component_func(upload.source), allow_tainted=allow_tainted)
for db_binary in upload.binaries:
+ # build queues may miss the source package if this is a binary-only upload
+ if suite != upload.target_suite:
+ transaction.copy_source(db_binary.source, suite, source_component_func(db_binary.source), allow_tainted=allow_tainted)
transaction.copy_binary(db_binary, suite, binary_component_func(db_binary), allow_tainted=allow_tainted, extra_archives=[upload.target_suite.archive])
# Copy .changes if needed
Logger.log(["Policy Queue ACCEPT", srcqueue.queue_name, changesname])
pu = get_processed_upload(upload)
- daklib.announce.announce_accept(upload)
+ daklib.announce.announce_accept(pu)
# TODO: code duplication. Similar code is in process-upload.
# Move .changes to done
if not Options["No-Action"]:
Logger.log(["Policy Queue REJECT", srcqueue.queue_name, upload.changes.changesname])
+ changes = upload.changes
remove_upload(upload, transaction)
+ session.delete(changes)
################################################################################
fs.unlink(os.path.join(queuedir, upload.changes.changesname))
session.delete(upload)
- session.delete(changes)
session.flush()
################################################################################
pu.changed_by = upload.changes.changedby
pu.fingerprint = upload.changes.fingerprint
- pu.suites = []
+ pu.suites = [ upload.target_suite ]
pu.from_policy_suites = [ upload.target_suite ]
changes_path = os.path.join(upload.policy_queue.path, upload.changes.changesname)