From: Luca Falavigna Date: Thu, 10 Dec 2009 23:35:33 +0000 (+0000) Subject: Correctly handle lists for SQL queries in get_binary_from_name_suite() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1c328bccadc7e7354e442088ad89a29b4bd63f2;p=dak Correctly handle lists for SQL queries in get_binary_from_name_suite() Signed-off-by: Luca Falavigna --- diff --git a/dak/examine_package.py b/dak/examine_package.py index 15a471cd..ea865ed8 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -306,9 +306,9 @@ def read_changes_or_dsc (suite, filename): def create_depends_string (suite, depends_tree): result = "" if suite == 'experimental': - suite_where = " in ('experimental','unstable')" + suite_where = "in ('experimental','unstable')" else: - suite_where = "'%s'" % suite + suite_where = "= '%s'" % suite comma_count = 1 session = DBConn().session() diff --git a/daklib/dbconn.py b/daklib/dbconn.py index fa9431b2..8d5dd4b5 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -383,7 +383,7 @@ def get_binary_from_name_suite(package, suitename, session=None): AND l.component = c.id AND ba.bin=b.id AND ba.suite = su.id - AND su.suite_name=%(suitename)s + AND su.suite_name %(suitename)s ORDER BY b.version DESC""" return session.execute(sql % {'package': package, 'suitename': suitename})