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

FTBFS on ubuntu 24.04 due to yaml content type detection in test #480

Closed fossfreedom closed 8 months ago

fossfreedom commented 8 months ago

The current version of appstream-glib on ubuntu 24.04 fails to build

https://launchpad.net/ubuntu/+source/appstream-glib/0.8.2-1build1/+build/27883476

The relevant part is

ok 66 /AppStream/utils{install-filename}
ok 67 /AppStream/utils{vercmp}
not ok /AppStream/yaml - As:ERROR:../libappstream-glib/as-self-test.c:5135:as_test_yaml_func: assertion failed (error == NULL): cannot process file of type application/yaml (as-node-error-quark, 0)
Bail out!
----------------------------------- stderr -----------------------------------
**
As:ERROR:../libappstream-glib/as-self-test.c:5135:as_test_yaml_func: assertion failed (error == NULL): cannot process file of type application/yaml (as-node-error-quark, 0)
==============================================================================

This is probably because of this change: https://httptoolkit.com/blog/yaml-media-type-rfc/

Indeed - changing https://github.com/hughsie/appstream-glib/blob/d26446e437c9b82f3267ca22874f86f4a1954638/libappstream-glib/as-yaml.c#L509 from "application/x-yaml" to "application/yaml" fixes the build