elementary / switchboard-plug-applications

Switchboard Applications Plug
https://elementary.io
GNU General Public License v3.0
14 stars 12 forks source link

appdata icon makes validation with appstream-glib fail #63

Closed decathorpe closed 1 year ago

decathorpe commented 4 years ago

Commit https://github.com/elementary/switchboard-plug-applications/commit/e5cbb23e59643bf29a3f2717230b3ff93835c7b6 added a stock icon to the appdata, but it appears the chosen value is nonstandard and now renders the appdata file invalid (when validating it with appstream-glib):

$ appstream-util validate-relax --nonet PATH_TO_INSTALLED.appdata.xml
? tag-invalid           : stock icon is not valid [preferences-desktop-applications]
Validation of files failed

This validation step is mandatory for fedora packages that ship appdata files.

It looks like this is also the case for other switchboard plugs, but I won't open issues for all of them unless required.

cassidyjames commented 4 years ago

I don't see anywhere in the spec that this is invalid. It states,

stock icons are loaded from stock. The icon name should never include any file-extension or path.

That's it; no list of acceptable or unacceptable values. If appstream-glib is failing here, it seems it's not up to spec. It even uses gimp as an example in the docs:

​<icon type="stock">gimp</icon>
decathorpe commented 4 years ago

Well, that's the problem with using two competing library implementations of appstream, I guess ... there's going to be differences like this :disappointed:

So you think this is a false-positive and should be reportes as a bug against appstream-glib?

cassidyjames commented 4 years ago

@decathorpe I do.

decathorpe commented 4 years ago

Alright, opened an issue with appstream-glib:

https://github.com/hughsie/appstream-glib/issues/360

decathorpe commented 4 years ago

So, some stock icons that actually exist are whitelisted in appstream-glib.

Still, that leaves some icons that don't exist in any standard icon theme (hicolor, HighContrast, Adwaita), and for those the whitelist doesn't make any sense (it probably also doesn't make sense to list them in the appdata, since those icons don't actually exist?

The icons that don't appear in the standard icon themes, but which are referenced by switchboard plug appdata, are: