[gnome-software/wip/kalev/flatpak-version-matching-fixes] flatpak: Make sure to always set the source when adding metadata



commit 4fffe1a148219880a8564367b9fdf12d53baca07
Author: Kalev Lember <klember redhat com>
Date:   Mon Jul 8 17:55:12 2019 +0300

    flatpak: Make sure to always set the source when adding metadata
    
    This makes it simpler to later match the flatpak to the appstream data.

 plugins/flatpak/gs-flatpak.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index f5379ffe..ffcfeac2 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -205,9 +205,12 @@ gs_flatpak_set_update_permissions (GsFlatpak *self, GsApp *app, FlatpakInstalled
 static void
 gs_flatpak_set_metadata (GsFlatpak *self, GsApp *app, FlatpakRef *xref)
 {
+       g_autofree gchar *ref_tmp = flatpak_ref_format_ref (FLATPAK_REF (xref));
+
        /* core */
        gs_flatpak_claim_app (self, app);
        gs_app_set_branch (app, flatpak_ref_get_branch (xref));
+       gs_app_add_source (app, ref_tmp);
        gs_plugin_refine_item_scope (self, app);
 
        /* flatpak specific */


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