X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_policy.py;h=8103fd0ba808453e8a63b02aaaa2cfd658648c68;hb=400aca3f47b5b52b58077e30c8c2d0fa9921034e;hp=26092e9bb667a4dd4423259f60fb7085c6225dae;hpb=d0bd22e69b1997f46805e338e97e89259d7e43ae;p=dak.git diff --git a/dak/process_policy.py b/dak/process_policy.py index 26092e9b..8103fd0b 100755 --- a/dak/process_policy.py +++ b/dak/process_policy.py @@ -68,6 +68,10 @@ def do_comments(dir, srcqueue, opref, npref, line, fn, transaction): else: changes_prefix = changes_prefix + '.changes' + # We need to escape "_" as we use it with the LIKE operator (via the + # SQLA startwith) later. + changes_prefix = changes_prefix.replace("_", r"\_") + uploads = session.query(PolicyQueueUpload).filter_by(policy_queue=srcqueue) \ .join(PolicyQueueUpload.changes).filter(DBChange.changesname.startswith(changes_prefix)) \ .order_by(PolicyQueueUpload.source_id) @@ -140,7 +144,7 @@ def comment_accept(upload, srcqueue, comments, transaction): 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(upload.source), allow_tainted=allow_tainted) + 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