[packagekit] packagekit: Branch 'master' - 4 commits

Richard Hughes hughsient at kemper.freedesktop.org
Fri Sep 21 11:48:10 PDT 2007


 backends/conary/helpers/conaryBackend.py |   19 ++++++++++++++-----
 backends/yum/pk-backend-yum.c            |    6 ++++--
 2 files changed, 18 insertions(+), 7 deletions(-)

New commits:
diff-tree 0582120fd35073f71d9a317ccc7189e8990de773 (from parents)
Merge: 7ce12ffe01b8cbef7a938aae2eb4729abb5b951e 5d850c868d80c0e7f75f02ef1f1caa0714e09dcd
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Sep 21 19:46:39 2007 +0100

    Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit

diff-tree 7ce12ffe01b8cbef7a938aae2eb4729abb5b951e (from 247549eac189e320f0c0f756fc14baf694b2af01)
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Sep 21 19:46:23 2007 +0100

    don't advertise stuff we can't do

diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index cb37eb8..8e91ea9 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -46,7 +46,7 @@ backend_get_filters (PkBackend *backend,
 {
 	g_return_if_fail (backend != NULL);
 	pk_enum_list_append_multiple (elist,
-				      PK_FILTER_ENUM_GUI,
+				      /*PK_FILTER_ENUM_GUI,*/
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
 				      -1);
@@ -176,6 +176,7 @@ backend_search_file (PkBackend *backend,
 	pk_backend_spawn_helper (backend, "search-file.py", filter, search, NULL);
 }
 
+#if 0
 /**
  * backend_search_group:
  */
@@ -186,6 +187,7 @@ backend_search_group (PkBackend *backend
 	pk_backend_allow_interrupt (backend, TRUE);
 	pk_backend_spawn_helper (backend, "search-group.py", filter, search, NULL);
 }
+#endif
 
 /**
  * backend_search_name:
@@ -246,7 +248,7 @@ PK_BACKEND_OPTIONS (
 	NULL,					/* resolve */
 	backend_search_details,			/* search_details */
 	backend_search_file,			/* search_file */
-	backend_search_group,			/* search_group */
+	NULL,					/* search_group */
 	backend_search_name,			/* search_name */
 	backend_update_package,			/* update_package */
 	backend_update_system			/* update_system */
diff-tree 5d850c868d80c0e7f75f02ef1f1caa0714e09dcd (from 247549eac189e320f0c0f756fc14baf694b2af01)
Author: Ken VanDine <ken at vandine.org>
Date:   Fri Sep 21 14:38:37 2007 -0400

    Apply the same TypeError fix to the live search

diff --git a/backends/conary/helpers/conaryBackend.py b/backends/conary/helpers/conaryBackend.py
index dced5cd..0158c9d 100644
--- a/backends/conary/helpers/conaryBackend.py
+++ b/backends/conary/helpers/conaryBackend.py
@@ -111,8 +111,12 @@ class PackageKitConaryBackend(PackageKit
                 self.cfg.flavor, None))
             # Remove dupes
             tempDict = {}
-            for element in troveTupleList:
-                tempDict[element] = None
+            try:
+                for element in troveTupleList:
+                    tempDict[element] = None
+            except TypeError:
+                del tempDict  # move on to the next method
+            else:
                 troveTupleList = tempDict.keys()
 
             # Get the latest first
diff-tree 247549eac189e320f0c0f756fc14baf694b2af01 (from 343a8006de50d8bc90c5d2a9a8a7391b3ecb3ced)
Author: Ken VanDine <ken at vandine.org>
Date:   Fri Sep 21 14:35:47 2007 -0400

    * Fixed read access to db
    * Actually commit the transaction when syncing the cache
    * Handle TypeErr when removing duplicate search results

diff --git a/backends/conary/helpers/conaryBackend.py b/backends/conary/helpers/conaryBackend.py
index f0209f3..dced5cd 100644
--- a/backends/conary/helpers/conaryBackend.py
+++ b/backends/conary/helpers/conaryBackend.py
@@ -57,8 +57,12 @@ class PackageKitConaryBackend(PackageKit
 
         # Remove dupes
         tempDict = {}
-        for element in troveTupleList:
-            tempDict[element] = None
+        try:
+            for element in troveTupleList:
+                tempDict[element] = None
+        except TypeError:
+            del tempDict  # move on to the next method
+        else:
             troveTupleList = tempDict.keys()
 
         # Get the latest first
@@ -333,7 +337,7 @@ class Cache(object):
 
         self.conn = dbstore.connect(os.path.join(self.dbPath, self.dbName))
         self.cursor = self.conn.cursor()
-        self.cursor.execute("PRAGMA count_changes=0")
+        self.cursor.execute("PRAGMA count_changes=0", start_transaction=False)
 
         if os.path.isfile(os.path.join(self.dbPath, self.dbName)):
             self._validate_tables()
@@ -466,6 +470,7 @@ class Cache(object):
 
         try:
             self.cursor.execute(sql, values)
+            self.conn.commit()
         except Exception,e:
             print str(e)
 



More information about the PackageKit mailing list