hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.
GNU Lesser General Public License v2.1
65 stars 103 forks source link

Don’t add default icons to input sources when composing appstream #419

Closed pwithnall closed 2 years ago

pwithnall commented 3 years ago

It’s causing input sources to appear with the wrong icon in gnome-software. See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1483

There’s no need to add a default icon to input sources because it’s not required by the spec. If client applications like gnome-software want to always show an icon, let them choose their own defaults.

This may also apply to codecs, fonts and other non-application components; I haven’t checked.

pwithnall commented 3 years ago

(I have no intention of following this up further: just filing the bug so some interested party from Fedora can follow it up, or at least all the conversation about it can happen in one place.)

hughsie commented 3 years ago

What happens with new metadata (without icons) and old gnome-software? If it works okay maybe we just nuke them.

pwithnall commented 3 years ago

I have not tested, but IIRC it should work fine with at least gnome-software 40. This all came to light because we changed the default/fallback icons for gnome-software 41, and then found that some input sources were still showing the old default/fallback icons. We only changed the icon names, not the code to add fallbacks, which is why I think it should work.

I’m less confident that nuking the as-glib code to add default categories would be OK. It probably would be, but would need more testing.

ximion commented 3 years ago

What happens with new metadata (without icons) and old gnome-software? If it works okay maybe we just nuke them.

On Debian/Ubuntu, we don't have any default fallback icon - if appstream-generator finds a component which is required to have an icon, and which doesn't have one, it's ignored with an error. If the component doesn't need an icon, it is passed through, so GNOME Software has been receiving no-icon inputmethods, codecs and drivers all this time. I just checked on my Debian system, and GNOME Software 40.4 definitely does the right thing and shows the right icons :-)

pwithnall commented 2 years ago

I wrote the trivial patch: https://github.com/hughsie/appstream-glib/pull/462