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 779379 - Software 3.20 uses name from .desktop instead of from appstream metadata
Software 3.20 uses name from .desktop instead of from appstream metadata
Status: RESOLVED OBSOLETE
Product: gnome-software
Classification: Applications
Component: General
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-02-28 19:02 UTC by Jeremy Bicha
Modified: 2018-01-24 17:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-software --verbose log (304.85 KB, text/plain)
2017-02-28 19:03 UTC, Jeremy Bicha
Details

Description Jeremy Bicha 2017-02-28 19:02:43 UTC
gnome-software 3.20.1+git20170208.0.a34b091-0ubuntu1
Ubuntu 16.04 LTS (xenial)

I added appstream metadata to Ubuntu's wine1.6 package for xenial-proposed. But gnome-software is showing "Configure Wine" as the name instead of "Wine". That name comes from wine-winecfg.desktop

https://launchpadlibrarian.net/305678434/wine1.6_1%3A1.6.2-0ubuntu14_1%3A1.6.2-0ubuntu14.1.diff.gz

In trying to work around this I set X-AppStream-Ignore=true for wine-winecfg.desktop but that didn't change what's shown in GNOME Software.

https://launchpadlibrarian.net/307535788/wine1.6_1%3A1.6.2-0ubuntu14.1_1%3A1.6.2-0ubuntu14.2.diff.gz

I also ran
sudo rm -rf /var/lib/app-info/; sudo rm -rf /var/cache/app-info/; sudo appstreamcli refresh

http://appstream.ubuntu.com/xenial-proposed/universe/metainfo/wine1.6.html

If issues were detected, this URL should be live:
http://appstream.ubuntu.com/xenial-proposed/universe/issues/wine1.6.html

I am attaching a log from gnome-software --verbose.
Comment 1 Jeremy Bicha 2017-02-28 19:03:27 UTC
Created attachment 346929 [details]
gnome-software --verbose log
Comment 2 Richard Hughes 2017-02-28 20:26:05 UTC
We should prefer the AppStream metadata unless --prefer-local is specified. Can you try with the recently released appstream-glib (yesterday) and see if this still happens? Thanks.
Comment 3 Jeremy Bicha 2017-02-28 20:38:08 UTC
I installed libappstream-glib8 0.6.9-1 on to Ubuntu 16.04 LTS and gnome-software still shows wine1.6 as "Configure Wine".

Does gnome-software need to be rebuilt against the new appstream-glib?
Comment 4 Iain Lane 2017-03-01 14:26:12 UTC
Here's what I suspect is going on-

"Configure Wine" comes from the appstream for the base release (xenial), because it read the .desktop file and managed to generate appstream from it.

We set "Priority" on the xenial-proposed appstream's header to try to influence things such that this overrides the release.

I would guess that this is in fact not correctly influencing things. From a quick look, it seems as if asglib isn't reading the field from the header (it can read it for individual components) and gnome-software therefore is also not considering it when showing lists of GsApps.

AFAIK g-s is trying to show only one entry per source, so hopefully it should be able to look at the priority somehow and pick the highest one. I'm not exactly sure how you'd implement this ATM - maybe in the appstream plugin somehow, or in gs_plugin_list_filter_duplicates (), or somewhere else completely.

So if I'm right, there's two fixes needed

  - asglib to wire through the priority to AsApp
  - gnome-software to consider this priority in some way when it has a choice of GsApps from the same source to consider

Is that enough for you to go on, Jeremy, if you want to try and have a go at fixing this?
Comment 5 GNOME Infrastructure Team 2018-01-24 17:29:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-software/issues/149.