From 1c2f731981cf3b0f963b4660e3dde71d870f32b3 Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Tue, 15 Apr 2014 16:06:29 +0200 Subject: Software-dbus: fix resolving of older packages Function pk_task_resolve_sync() won't return all versions of required package, so this patch replaces this function with pk_task_search_names_sync() which returns all versions of given package. --- src/software-dbus/LMI_SoftwareIdentityProvider.c | 2 +- src/software-dbus/sw-utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/software-dbus/LMI_SoftwareIdentityProvider.c b/src/software-dbus/LMI_SoftwareIdentityProvider.c index c0052d1..3806584 100644 --- a/src/software-dbus/LMI_SoftwareIdentityProvider.c +++ b/src/software-dbus/LMI_SoftwareIdentityProvider.c @@ -149,7 +149,7 @@ static CMPIStatus LMI_SoftwareIdentityGetInstance( values[0] = g_strdup(sw_pkg.name); values[1] = NULL; - results = pk_task_resolve_sync(task, 0, values, NULL, NULL, NULL, &gerror); + results = pk_task_search_names_sync(task, 0, values, NULL, NULL, NULL, &gerror); if (check_and_create_error_msg(results, gerror, "Resolving package failed", error_msg, ERROR_MSG_LEN)) { goto done; diff --git a/src/software-dbus/sw-utils.c b/src/software-dbus/sw-utils.c index 156c5ae..e2a252d 100644 --- a/src/software-dbus/sw-utils.c +++ b/src/software-dbus/sw-utils.c @@ -227,7 +227,7 @@ short is_valid_sw_pkg_elem_name(const char *elem_name) values[0] = g_strdup(sw_pkg.name); values[1] = NULL; - results = pk_task_resolve_sync(task, 0, values, NULL, NULL, NULL, &gerror); + results = pk_task_search_names_sync(task, 0, values, NULL, NULL, NULL, &gerror); if (check_and_create_error_msg(results, gerror, "Resolving package failed", error_msg, ERROR_MSG_LEN)) { warn(error_msg); -- cgit