appstream-glib icon indicating copy to clipboard operation
appstream-glib copied to clipboard

appstream-util validate doesn't like GNOME 40 numbers

Open nielsdg opened this issue 5 years ago • 2 comments

gnome-contacts has a test which runs appstream-util to validate the org.gnome.Contacts.appdata.xml appstream file. GNOME Contacts has followed the appstream spec quite well, adding also development releases.

The problem is that appstream-util doesn't like the following construct:

<releases>
  <release date="2021-03-23" version="40.0">
    <!-- release notes -->
  </release>
  <release date="2021-03-01" version="40.beta" type="development">
    <!-- release notes -->
  </release>
</releases>

I get the following error message:

• tag-invalid           : <release> versions are not in order [40.0 before 40.beta]

nielsdg avatar Mar 23 '21 07:03 nielsdg

Funnily enough, it doesn't care that much when using the Fedora-provided appstream-util command. I saw something pass by wrt versioning validation which is optionally done by some RPM module. Maybe that's the reason why it succeeds on Fedora but not on other distros? (or a jhbuild session in my case)

nielsdg avatar Mar 23 '21 07:03 nielsdg

IIRC if rpm is available we use rpmvercmp (which works with .beta) and if not we fall back to something dumb.

hughsie avatar Mar 23 '21 09:03 hughsie