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

Richard Hughes hughsient at kemper.freedesktop.org
Sun Dec 2 10:48:08 PST 2007


 backends/zypp/pk-backend-zypp.cpp |    8 ++++++++
 backends/zypp/zypp-utils.cpp      |   17 +++++++++++++++++
 backends/zypp/zypp-utils.h        |    2 ++
 libpackagekit/wscript_build       |    1 +
 4 files changed, 28 insertions(+)

New commits:
commit fc53450dc8eeddb44d20f3f5c18b254985150f04
Author: Gustavo Carneiro <gjc at inescporto.pt>
Date:   Sat Dec 1 14:02:23 2007 +0000

    Fix x86_64 build (missing -fPIC).

diff --git a/libpackagekit/wscript_build b/libpackagekit/wscript_build
index 59dd423..5e31272 100644
--- a/libpackagekit/wscript_build
+++ b/libpackagekit/wscript_build
@@ -15,6 +15,7 @@ obj = bld.create_obj('gnome', 'objects')
 obj.includes = '. ../libgbus ../libselftest'
 obj.target = 'libpkgkit_common_source'
 obj.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB'
+obj.env.append_value('CCFLAGS', obj.env['shlib_CCFLAGS'])
 obj.source = """
 	pk-debug.c
 	pk-connection.c
commit e04930e488a37c08f4a9bb4f69c72f1696f92c2d
Author: Boyd Timothy <btimothy at gmail.com>
Date:   Fri Nov 30 15:50:53 2007 -0700

    Fleshing out more of the backend_search_name for zypp backend

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index eda2f6d..7de76df 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -571,6 +571,14 @@ find_packages_real (PkBackend *backend, const gchar *search, const gchar *filter
 
 	pk_backend_no_percentage_updates (backend);
 
+	switch (mode) {
+		case SEARCH_TYPE_NAME:
+			std::vector<zypp::PoolItem> *v = zypp_get_packages_by_name (search);
+			zypp_emit_packages_in_list (backend, v);
+			delete (v);
+			break;
+	};
+
 /*
 	if (mode == SEARCH_TYPE_FILE) {
 		if (installed == FALSE && available == FALSE) {
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index 4034f07..866016a 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -131,5 +131,22 @@ zypp_build_package_id_from_resolvable (zypp::Resolvable::constPtr resolvable)
 	return package_id;
 }
 
+void
+zypp_emit_packages_in_list (PkBackend *backend, std::vector<zypp::PoolItem> *v)
+{
+	for (std::vector<zypp::PoolItem>::iterator it = v->begin ();
+			it != v->end (); it++) {
+		zypp::ResObject::constPtr pkg = (*it);
+
+		// TODO: Determine whether this package is installed or not
+		gchar *package_id = zypp_build_package_id_from_resolvable (pkg);
+		pk_backend_package (backend,
+			    PK_INFO_ENUM_AVAILABLE,
+			    package_id,
+			    pkg->description ().c_str ());
+		g_free (package_id);
+	}
+}
+
 #endif // _ZYPP_UTILS_H_
 
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index b44beae..b9c97db 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -39,5 +39,7 @@ zypp::ResPool zypp_build_pool (gboolean include_local);
 std::vector<zypp::PoolItem> * zypp_get_packages_by_name (const gchar *package_name);
 
 gchar * zypp_build_package_id_from_resolvable (zypp::Resolvable::constPtr resolvable);
+
+void zypp_emit_packages_in_list (PkBackend *backend, std::vector<zypp::PoolItem> *v);
 #endif // _ZYPP_UTILS_H_
 



More information about the PackageKit mailing list