summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_remote_scheduler.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index 2e5f7a9e..59e2498e 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -106,15 +106,16 @@ if arch not in ARCHS:
sys.exit(1)
if issue or status or built_after or built_before:
- formatter = dict(suite=suite)
+ formatter = dict(suite=suite, notes_table='')
log.info('Querying packages with given issues/status...')
query = 'SELECT s.name ' + \
- 'FROM sources AS s, notes AS n, results AS r ' + \
- 'WHERE n.package_id=s.id AND r.package_id=s.id ' + \
+ 'FROM sources AS s, {notes_table} results AS r ' + \
+ 'WHERE r.package_id=s.id ' + \
'AND s.suite = "{suite}" AND r.status != "blacklisted" '
if issue:
- query += 'AND n.issues LIKE "%{issue}%" '
+ query += 'AND n.package_id=s.id AND n.issues LIKE "%{issue}%" '
formatter['issue'] = issue
+ formatter['notes_table'] = 'notes AS n,'
if status:
query += 'AND r.status = "{status}"'
formatter['status'] = status