[PATCH] * backends/apt/pk-apt-search-plain.c, backends/apt/pk-backend-apt.c: - make them compile again (pk-backend-python.{c,h} seems to be gone

Michael Vogt mvo at ubuntu.com
Wed Feb 13 10:31:19 PST 2008


---
 backends/apt/pk-apt-search-plain.c |   16 +++++++++++-----
 backends/apt/pk-backend-apt.c      |    8 ++++----
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/backends/apt/pk-apt-search-plain.c b/backends/apt/pk-apt-search-plain.c
index 155fdb8..71792f5 100644
--- a/backends/apt/pk-apt-search-plain.c
+++ b/backends/apt/pk-apt-search-plain.c
@@ -23,7 +23,9 @@
 #include <glib.h>
 #include <string.h>
 #include <pk-backend.h>
-#include <pk-backend-python.h>
+#include <pk-backend-spawn.h>
+
+extern PkBackendSpawn *spawn;
 
 /**
  * backend_get_groups:
@@ -66,7 +68,8 @@ backend_get_filters (PkBackend *backend, PkEnumList *elist)
 void
 backend_get_description (PkBackend *backend, const gchar *package_id)
 {
-	pk_backend_python_get_description(backend,package_id);
+        g_return_if_fail (backend != NULL);
+        pk_backend_spawn_helper (spawn, "get-description.py", package_id, NULL);
 }
 
 /**
@@ -76,7 +79,8 @@ backend_get_description (PkBackend *backend, const gchar *package_id)
 void
 backend_search_details (PkBackend *backend, const gchar *filter, const gchar *search)
 {
-	pk_backend_python_search_details(backend,filter,search);
+        g_return_if_fail (backend != NULL);
+        pk_backend_spawn_helper (spawn, "search-details.py", filter, search, NULL);
 }
 
 /**
@@ -85,7 +89,8 @@ backend_search_details (PkBackend *backend, const gchar *filter, const gchar *se
 void
 backend_search_name (PkBackend *backend, const gchar *filter, const gchar *search)
 {
-	pk_backend_python_search_name(backend,filter,search);
+       g_return_if_fail (backend != NULL);
+       pk_backend_spawn_helper (spawn, "search-name.py", filter, search, NULL);
 }
 
 /**
@@ -94,7 +99,8 @@ backend_search_name (PkBackend *backend, const gchar *filter, const gchar *searc
 void
 backend_search_group (PkBackend *backend, const gchar *filter, const gchar *search)
 {
-	pk_backend_python_search_group(backend,filter,search);
+        g_return_if_fail (backend != NULL);
+        pk_backend_spawn_helper (spawn, "search-group.py", filter, search, NULL);
 }
 
 /* don't need to do any setup/finalize in the plain search mode */
diff --git a/backends/apt/pk-backend-apt.c b/backends/apt/pk-backend-apt.c
index 5371163..c5710c5 100644
--- a/backends/apt/pk-backend-apt.c
+++ b/backends/apt/pk-backend-apt.c
@@ -29,7 +29,7 @@
 #include "pk-apt-search.h"
 #include "config.h"
 
-static PkBackendSpawn *spawn;
+PkBackendSpawn *spawn;
 static PkNetwork *network;
 
 /**
@@ -43,7 +43,7 @@ backend_initalize (PkBackend *backend)
 	pk_debug ("FILTER: initalize");
 	network = pk_network_new ();
 	spawn = pk_backend_spawn_new ();
-	pk_backend_spawn_set_name (spawn, "yum");
+	pk_backend_spawn_set_name (spawn, "apt");
 	backend_init_search (backend);
 }
 
@@ -134,11 +134,11 @@ backend_get_updates (PkBackend *backend)
  * backend_get_update_detail:
  */
 static void
-backend_get_update_detail (PkBackend *backend)
+backend_get_update_detail (PkBackend *backend, const gchar *package_id)
 {
 	g_return_if_fail (backend != NULL);
 	g_return_if_fail (spawn != NULL);
-	pk_backend_spawn_helper (spawn, "get-update-detail.py", NULL);
+	pk_backend_spawn_helper (spawn, "get-update-detail.py", package_id, NULL);
 }
 
 /**
-- 
1.5.3.7


--GRPZ8SYKNexpdSJ7
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0004-backends-apt-helpers-aptBackend.py.patch"



More information about the PackageKit mailing list