[gnome-software/gnome-3-30] flatpak: Fix locally installed flatpak bundles to show up



commit 1ed07e87765bbdd41079acd5a76aa47434bdd992
Author: Kalev Lember <klember redhat com>
Date:   Tue Oct 16 13:08:52 2018 +0200

    flatpak: Fix locally installed flatpak bundles to show up
    
    The AsApps that were created for locally installed bundles didn't have
    any way to map them back to flatpak refs. This commit adds AsBundle info
    to fix this.

 plugins/flatpak/gs-flatpak.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 35f64f1a..ed83038e 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -434,6 +434,15 @@ gs_flatpak_rescan_installed (GsFlatpak *self,
                        continue;
                }
 
+               /* add the bundle info */
+               if (as_app_get_bundle_default (app) == NULL) {
+                       g_autoptr(AsBundle) bundle = as_bundle_new ();
+                       g_autofree gchar *ref = flatpak_ref_format_ref (FLATPAK_REF (app_ref));
+                       as_bundle_set_kind (bundle, AS_BUNDLE_KIND_FLATPAK);
+                       as_bundle_set_id (bundle, ref);
+                       as_app_add_bundle (app, bundle);
+               }
+
                as_app_set_branch (app, flatpak_ref_get_branch (FLATPAK_REF (app_ref)));
                as_app_set_icon_path (app, path_exports);
                as_app_add_keyword (app, NULL, "flatpak");


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