From: Ansgar Burchardt Date: Sun, 8 Jul 2012 19:23:25 +0000 (-0600) Subject: daklib/archive.py (install_binary): fix use of source_suites X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=23a382800c81534682ba64c75e976830c24b4f71;p=dak.git daklib/archive.py (install_binary): fix use of source_suites --- diff --git a/daklib/archive.py b/daklib/archive.py index edb99914..2ee4d89b 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -136,7 +136,8 @@ class ArchiveTransaction(object): source = source_query.filter(DBSource.suites.contains(suite)).first() if source is None: if source_suites != True: - source_query = source_query.filter(DBSource.suites.any(source_suites)) + source_query = source_query.join(DBSource.suites) \ + .filter(Suite.suite_id == source_suites.c.id) source = source_query.first() if source is None: raise ArchiveException('{0}: trying to install to {1}, but could not find source'.format(binary.hashed_file.filename, suite.suite_name))