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

Update current newest version in AsStore #407

Closed tintou closed 3 years ago

tintou commented 3 years ago

We are now in version 0.14

Closes #406

Signed-off-by: Corentin Noël corentin.noel@collabora.com

ximion commented 3 years ago

I wonder: Are there any integer comparisons made with this variable? Because 0.14 < 0.9 - for this reason, libappstream uses an enum for this, so you can still easily check whether the current target API version is > a tested version. If there's no direct comparisons made with this definition, this change is fine.

tintou commented 3 years ago

Hmm, indeed there is indirectly here: https://github.com/hughsie/appstream-glib/blob/6d6b8f488e4cd072818af037978e44fe61bf3415/libappstream-glib/as-app.c#L4834 that compares it.

hughsie commented 3 years ago

@tintou could you do a PR to change that comparison to use as_utils_vercmp() please. Thanks!

ximion commented 3 years ago

@hughsie AS_API_VERSION_NEWEST would need to become a string constant then - is this API exported anywhere? Libappstream "cheats" an uses an enum for this ^^ ( https://github.com/ximion/appstream/blob/master/src/as-context.h#L49 )