]> git.decadent.org.uk Git - dak.git/blobdiff - dak/process_unchecked.py
fix things I broke yesterday with the contents merge
[dak.git] / dak / process_unchecked.py
index 07e3c22abc0514f179d8c6cf854639fc4dadd85b..5bd8bf2c1359bfe96a1d775aac2f7f130fb8ec0f 100755 (executable)
@@ -389,7 +389,8 @@ def check_files():
     cursor = DBConn().cursor()
     # Check for packages that have moved from one component to another
     # STU: this should probably be changed to not join on architecture, suite tables but instead to used their cached name->id mappings from DBConn
-    cursor.execute("""PREPARE moved_pkg_q(text,text,text) AS
+    DBConn().prepare("moved_pkg_q", """
+        PREPARE moved_pkg_q(text,text,text) AS
         SELECT c.name FROM binaries b, bin_associations ba, suite s, location l,
                     component c, architecture a, files f
         WHERE b.package = $1 AND s.suite_name = $2
@@ -561,7 +562,7 @@ def check_files():
             # Check the version and for file overwrites
             reject(Upload.check_binary_against_db(f),"")
 
-            Binary(f, reject).scan_package( )
+            Binary(f, reject).scan_package()
 
         # Checks for a source package...
         else:
@@ -1319,11 +1320,11 @@ def is_stableupdate ():
         cursor.execute( """SELECT 1 FROM source s
                            JOIN src_associations sa ON (s.id = sa.source)
                            WHERE s.source = %(source)s
-                              AND s.version = '%(version)s'
+                              AND s.version = %(version)s
                               AND sa.suite = %(suite)d""",
                         {'source' : changes['source'],
                          'version' : changes['version'],
-                         'suite' : pasuite})
+                         'suite' : pusuite})
 
         if cursor.fetchone():
             # source is already in proposed-updates so no need to hold
@@ -1358,7 +1359,7 @@ def is_oldstableupdate ():
                                AND sa.suite = %d""",
                         {'source' : changes['source'],
                          'version' : changes['version'],
-                         'suite' : pasuite})
+                         'suite' : pusuite})
         if cursor.fetchone():
             return 0