[yum-cvs] yum/yum sqlitesack.py,1.74,1.75

Jeremy Katz katzj at linux.duke.edu
Fri Mar 2 19:18:58 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv27430/yum

Modified Files:
	sqlitesack.py 
Log Message:
* convert pkgids to be str type instead of unicode.
* can't do qmark substitution with "where foo in ?" expressions.  at least,
  I can't figure out how to make them work.  


Index: sqlitesack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/sqlitesack.py,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- sqlitesack.py	28 Feb 2007 22:49:53 -0000	1.74
+++ sqlitesack.py	2 Mar 2007 19:18:56 -0000	1.75
@@ -374,7 +374,8 @@
 
         for (rep,cache) in self.primarydb.items():
             cur = cache.cursor()
-            executeSQL(cur, "select * from packages where pkgId in (?)", (pkgid_query,))
+            executeSQL(cur, "select * from packages where pkgId in %s" %(pkgid_query,))
+            #executeSQL(cur, "select * from packages where pkgId in %s" %(pkgid_query,))            
             for ob in cur.fetchall():
                 pkgs.append(ob)
         
@@ -416,7 +417,7 @@
 
         if matched: # if its in the primary.xml files then skip the other check
             return results
-        
+
         #FIXME - sort this all out.
         # If it is a filename, search the files.xml file info
         for (rep,cache) in self.filelistsdb.items():
@@ -457,7 +458,7 @@
                 if filename and not quicklookup.has_key(filename):
                     continue
                 
-                matching_ids.append(res['pkgId'])
+                matching_ids.append(str(res['pkgId']))
                 
             
             pkgs = self._getListofPackageDetails(matching_ids)




More information about the Yum-cvs-commits mailing list