[gnome-software/wip/kalev/gnome-3-30-refining-wildcard-extensions] appstream: Fix refining wildcard shell extensions



commit c61fdacc836442e2369e515244b6ceaaf67a4c2c
Author: Kalev Lember <klember redhat com>
Date:   Mon Nov 19 10:45:56 2018 +0100

    appstream: Fix refining wildcard shell extensions
    
    The shell extensions plugin uses the "shell-extensions::uuid" custom
    metadata key for installation method. Check that when refining wildcard
    apps in the appstream plugin and allow matches if the custom key is set.
    
    This fixes opening shell extensions from the tweak tool that regressed
    with commit 9198056 that removed that global cache.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/430

 plugins/core/gs-plugin-appstream.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 77ae05e8..2fe091d0 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -536,10 +536,11 @@ gs_plugin_refine_wildcard (GsPlugin *plugin,
 
                /* does the app have an installation method */
                if (as_app_get_pkgname_default (item) == NULL &&
-                   as_app_get_bundle_default (item) == NULL) {
+                   as_app_get_bundle_default (item) == NULL &&
+                   as_app_get_metadata_item (item, "shell-extensions::uuid") == NULL) {
                        g_debug ("not using %s for wildcard as "
-                                "no bundle or pkgname",
-                                as_app_get_id (item));
+                                "no installation method",
+                                as_app_get_unique_id (item));
                        continue;
                }
 


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