Patch Set 1:
This is certainly functional, but I think that the version strings spit out don't make sense for libflashrom. They include letters and are not monotonically increasing, even at tagged releases. So I think some sed magic is going to be needed to make it useful.
Understood, and I agree. But it's unrelated to this patch. This patch
changes the version of `project('flashromutils'...` it doesn't say
libflashrom. If libflashrom/pkg-config needs special handling, that
should be treated separately (I don't know how). If need be, I would
agree to remove the v prefix from releases. But versions between the
releases just don't have numbers...Well further down in meson.build it pulls that number for pkg-config.
version : meson.project_version(),So I think some sanitization needs to happen rather than just picking that up. I would propose something like dropping the prefix and if there is a '-' sed everything from that into a .999
.999 would imply it's later than any point release that might
still happen in the future. How about no suffix at all? that
would somehow imply there is nothing new in the library since
the last release that should be expected in the future (matches
flashrom's development model).
Yes no suffix is fine to me considering that.
+version = meson.project_version()
+if version.startswith('v')
+ version = version.split('v')[1]
+endifWe also have to expect and remove 'p' (see [1]). Using
split() looks odd, but I don't know how to do it better.
Yeah I guess 'p' needs to be filtered too then.
+if version.contains ('-')
+ version = version.split('-')[0] + '.999'I would prefer to drop the .999
[1] https://flashrom.org/Development_Guidelines
Sure seems fine by me. Go head and add this to your CL as you see fit.
To view, visit change 35561. To unsubscribe, or for help writing mail filters, visit settings.