From: Luca Falavigna Date: Tue, 8 Dec 2009 00:54:58 +0000 (+0000) Subject: Restore display of package colours X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=9b06f7936bbcc196752d3e217a2a5eef5cbe4ea8;p=dak.git Restore display of package colours Adjust SQL and parameters strings to correctly execute SQL query and thus restoring display of package colours in examine-package. Signed-off-by: Luca Falavigna --- diff --git a/dak/examine_package.py b/dak/examine_package.py index 55b55aa9..15a471cd 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -308,7 +308,7 @@ def create_depends_string (suite, depends_tree): if suite == 'experimental': 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 2b2d01df..fa9431b2 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -377,16 +377,16 @@ def get_binary_from_name_suite(package, suitename, session=None): sql = """SELECT DISTINCT(b.package), b.version, c.name, su.suite_name FROM binaries b, files fi, location l, component c, bin_associations ba, suite su - WHERE b.package=:package + WHERE b.package='%(package)s' AND b.file = fi.id AND fi.location = l.id AND l.component = c.id AND ba.bin=b.id AND ba.suite = su.id - AND su.suite_name=:suitename + AND su.suite_name=%(suitename)s ORDER BY b.version DESC""" - return session.execute(sql, {'package': package, 'suitename': suitename}) + return session.execute(sql % {'package': package, 'suitename': suitename}) __all__.append('get_binary_from_name_suite')