[gnome-software] Do not depend on a development snapshot of PackageKit



commit f72fe124fdcf44770b9378d4bb0e6d9eb8baffcf
Author: Richard Hughes <richard hughsie com>
Date:   Tue Feb 4 10:23:12 2014 +0000

    Do not depend on a development snapshot of PackageKit

 src/plugins/gs-plugin-packagekit-refresh.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index de8956b..e37059b 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -205,16 +205,23 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
        GPtrArray *array = NULL;
        GsApp *app = NULL;
        PkDetails *item;
-       PkResults *results;
+       PkResults *results = NULL;
 
        /* get details */
        files = g_strsplit (filename, "\t", -1);
        pk_client_set_cache_age (PK_CLIENT (plugin->priv->task), G_MAXUINT);
+#if PK_CHECK_VERSION(0,9,1)
        results = pk_client_get_details_local (PK_CLIENT (plugin->priv->task),
                                               files,
                                               cancellable,
                                               gs_plugin_packagekit_progress_cb, plugin,
                                               error);
+#else
+       g_set_error_literal (error,
+                            GS_PLUGIN_ERROR,
+                            GS_PLUGIN_ERROR_FAILED,
+                            "GetDetailsLocal() not supported");
+#endif
        if (results == NULL) {
                ret = FALSE;
                goto out;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]