After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771449 - Do not show an update for apps whose latest flatpak commit is NULL
Do not show an update for apps whose latest flatpak commit is NULL
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-09-14 20:32 UTC by Joaquim Rocha
Modified: 2016-12-02 14:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not show an update for apps whose latest flatpak commit is NULL (1.40 KB, patch)
2016-09-14 20:32 UTC, Joaquim Rocha
none Details | Review
Do not show an update for apps whose latest flatpak commit is NULL (1.44 KB, patch)
2016-12-02 14:20 UTC, Joaquim Rocha
none Details | Review

Description Joaquim Rocha 2016-09-14 20:32:09 UTC
The logic for setting an app as updatable works by comparing the current commit of an app with the latest one available. However, if an app no longer exists in its remote, then the latest commit is being set as NULL, thus resulting in a wrong update for the app in GNOME Software.

I have also filed an issue on Flatpak [1] to see if that NULL return is something intentional or not. So keep in mind that if it gets changed in Flatpak, then the patch I am attaching here is no longer necessary.

[1] https://github.com/flatpak/flatpak/issues/309
Comment 1 Joaquim Rocha 2016-09-14 20:32:13 UTC
Created attachment 335571 [details] [review]
Do not show an update for apps whose latest flatpak commit is NULL

The logic for setting an app as updatable works by comparing the current
commit of an app with the latest one available.
However, if an app no longer exists in its remote, then the latest
commit is being set as NULL, thus resulting in a wrong update for the
app in GNOME Software.

This patch simply checks if the latest commit of an app is not NULL
before comparing the commits in question.
Comment 2 Richard Hughes 2016-09-14 21:00:10 UTC
I think this is probably a good idea regardless, but I'd change the debug message for the NULL case (i.e. have two 'if' statements)
Comment 3 Joaquim Rocha 2016-12-02 14:20:52 UTC
Created attachment 341239 [details] [review]
Do not show an update for apps whose latest flatpak commit is NULL
Comment 4 Joaquim Rocha 2016-12-02 14:29:04 UTC
Fixed in master.