]> err.no Git - dak/commitdiff
Restore display of package colours
authorLuca Falavigna <dktrkranz@debian.org>
Tue, 8 Dec 2009 00:54:58 +0000 (00:54 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Tue, 8 Dec 2009 00:54:58 +0000 (00:54 +0000)
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 <dktrkranz@debian.org>
dak/examine_package.py
daklib/dbconn.py

index 55b55aa9a7ce4fd447b85b71657e0caeea97a919..15a471cd231a2ef7168c723b81195d08b942a9e1 100755 (executable)
@@ -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()
index 2b2d01dfacb7bc72e9d409e754ea8185a23705c7..fa9431b23b2d1c696752b5faa443553b5cc695bd 100644 (file)
@@ -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')