[gnome-software] Use the full AppStream ID when creating results from Search()



commit 8674ef88c085f051c99a50dc3f0288a257c51b3c
Author: Richard Hughes <richard hughsie com>
Date:   Tue Apr 8 13:24:40 2014 +0100

    Use the full AppStream ID when creating results from Search()
    
    Using the short ID means we use the fallback path of the source name, which
    means we get duplicate applications when a single package ships multiple desktop
    files.
    
    Note, packages should really be split up in this case anyway, otherwise removing
    one application may also remove others.
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=727577

 src/plugins/gs-plugin-appstream.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 507dc32..8f94fd7 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -645,7 +645,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
                        continue;
 
                /* got a search match, so add all the data we can */
-               app = gs_app_new (as_app_get_id (item));
+               app = gs_app_new (as_app_get_id_full (item));
                ret = gs_plugin_refine_item (plugin, app, item, error);
                if (!ret)
                        goto out;
@@ -686,7 +686,7 @@ gs_plugin_add_search (GsPlugin *plugin,
        for (i = 0; i < array->len; i++) {
                item = g_ptr_array_index (array, i);
                if (as_app_search_matches_all (item, values) != 0) {
-                       app = gs_app_new (as_app_get_id (item));
+                       app = gs_app_new (as_app_get_id_full (item));
                        ret = gs_plugin_refine_item (plugin, app, item, error);
                        if (!ret)
                                goto out;


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