summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Schiffer <pschiffe@redhat.com>2014-04-15 16:06:29 +0200
committerPeter Schiffer <pschiffe@redhat.com>2014-04-15 16:11:47 +0200
commit1c2f731981cf3b0f963b4660e3dde71d870f32b3 (patch)
tree0c16114aa4d8bb3c4dfce7ae42d40d26a9d3c68c
parent60e05d5c8a6898864da33d4f182c24e7cfeae07e (diff)
downloadopenlmi-providers-1c2f731981cf3b0f963b4660e3dde71d870f32b3.tar.gz
openlmi-providers-1c2f731981cf3b0f963b4660e3dde71d870f32b3.tar.xz
openlmi-providers-1c2f731981cf3b0f963b4660e3dde71d870f32b3.zip
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.
-rw-r--r--src/software-dbus/LMI_SoftwareIdentityProvider.c2
-rw-r--r--src/software-dbus/sw-utils.c2
2 files changed, 2 insertions, 2 deletions
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);