[gnome-software/1151-flatpak-not-having-latest-commit-is-not-a-problem] flatpak: Not having latest commit is not a problem



commit 7374f7a22a234290030d3ab0996e5e0859ad6bbe
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 19 11:17:49 2021 +0100

    flatpak: Not having latest commit is not a problem
    
    The updates page could hide pending Flatpak updates when the ref did not
    contain the latest commit, but it is a valid state, thus no need to ignore
    such applications.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1151

 plugins/flatpak/gs-flatpak.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 07f29c08b..05cd2673f 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1604,7 +1604,6 @@ gs_flatpak_add_updates (GsFlatpak *self, GsAppList *list,
                if (latest_commit == NULL) {
                        g_debug ("could not get latest commit for %s",
                                 flatpak_ref_get_name (FLATPAK_REF (xref)));
-                       continue;
                }
 
                app = gs_flatpak_create_installed (self, xref, NULL, cancellable);
@@ -1628,7 +1627,7 @@ gs_flatpak_add_updates (GsFlatpak *self, GsAppList *list,
                        gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
 
                /* already downloaded */
-               if (g_strcmp0 (commit, latest_commit) != 0) {
+               if (latest_commit && g_strcmp0 (commit, latest_commit) != 0) {
                        g_debug ("%s has a downloaded update %s->%s",
                                 flatpak_ref_get_name (FLATPAK_REF (xref)),
                                 commit, latest_commit);


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