[gnome-software] Support installing flatpakrepo files without optional fields



commit 31f6bea19b4ed9c35e57a3dd657bef9e729bbf4b
Author: Richard Hughes <richard hughsie com>
Date:   Wed Oct 12 11:12:35 2016 +0100

    Support installing flatpakrepo files without optional fields
    
    Don't (mis)use the homepage property to store the flatpak URL. This worked for
    some files where Homepage=Url but not in the case where they differed or where
    the optional Homepage was missing.
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=772788

 src/plugins/gs-flatpak.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index f156ea2..84b7fc5 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -865,8 +865,8 @@ gs_flatpak_app_install_source (GsFlatpak *self, GsApp *app,
 
        /* create a new remote */
        xremote = flatpak_remote_new (gs_app_get_id (app));
+       flatpak_remote_set_url (xremote, gs_app_get_metadata_item (app, "flatpak::url"));
        flatpak_remote_set_noenumerate (xremote, FALSE);
-       flatpak_remote_set_url (xremote, gs_app_get_url (app, AS_URL_KIND_HOMEPAGE));
        if (gs_app_get_summary (app) != NULL)
                flatpak_remote_set_title (xremote, gs_app_get_summary (app));
 
@@ -2366,6 +2366,7 @@ gs_flatpak_file_to_app_repo (GsFlatpak *self,
        gs_app_add_quirk (app, AS_APP_QUIRK_NOT_LAUNCHABLE);
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, repo_title);
        gs_app_set_metadata (app, "flatpak::gpg-key", repo_gpgkey);
+       gs_app_set_metadata (app, "flatpak::url", repo_url);
        gs_app_set_origin_hostname (app, repo_url);
        gs_app_set_management_plugin (app, gs_plugin_get_name (self->plugin));
 


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