Confusing “release required” error
Running appstream-util validate --nonet on https://gitlab.gnome.org/GNOME/buoh/-/blob/7f31a7722b2b1e6fc95c548459cdca033225b59c/data/org.gnome.buoh.appdata.xml.in complains:
• tag-missing : <release> required
but the <release> tags are there.
<releases> is the parent for <release> -- i.e. it's not a valid file.
Yes, I discovered that later. The issue is that the error message is not really useful for determining that.
Pull request welcome dude.
Look like the validator does not work with the XML DOM but AsApp object:
https://github.com/hughsie/appstream-glib/blob/0306be0e508364eb7672bf9ba0d2d8541a4517e4/libappstream-glib/as-app-validate.c#L957-L963
Not sure how to do that nicely, other than adding a releases_present boolean field to AsAppPrivate and enabling it in the parser when releases is encountered:
https://github.com/hughsie/appstream-glib/blob/2733e9c2813f29a09ac5c57939475b74ac095894/libappstream-glib/as-app.c#L5759-L5768
other than adding a releases_present boolean field to AsAppPrivate
I think that's probably fine, thanks.
Looking into it more, maybe the problems field would be more suitable.
I'm having this issue, except I don't have any <releases> nor <release> tags at all. From what I can tell they should be optional: https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#qsr-app-contents-suggestions
What gives?
Here's the XML: https://github.com/Newbytee/mirage/blob/eb35114670699f7f1e29d22a8ff4106a6a361861/packaging/mirage.appdata.xml
Maybe use validate-relax? Release notes are kinda important...
Related to #457 perhaps?
I think it is odd that it checks for <url> and <releases> on the same level, as the specification separate those two under "recommended" and "suggested":
https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html