tools: bootstrap: fix version checking algorithm
If major number is not equal for needmajor and gotmajor, the version
checker returns old, which can lead to faulty results.
For example:
check_version meson 1.0.0 0.6.0 returns old; where expected is ok.
Fix this issue by changing the check of ne to gt. So that it returns
old if needmajor is greater than gotmajor.
Testcases:
==========
After change:
-------------
MyApp got:1.0.0 need:0.6.0 | actual: ok expected: ok
MyApp got:1.0.0 need:1.0.0 | actual: ok expected: ok
MyApp got:2.0.0 need:1.0.0 | actual: ok expected: ok
MyApp got:1.1.0 need:1.0.0 | actual: ok expected: ok
MyApp got:1.0.1 need:1.0.0 | actual: ok expected: ok
MyApp got:1.0.0 need:2.0.0 | actual: old expected: old
MyApp got:1.0.0 need:1.1.0 | actual: old expected: old
MyApp got:1.0.0 need:1.0.1 | actual: old expected: old
MyApp got:0.9.9 need:1.0.0 | actual: old expected: old
MyApp got:1.9.9 need:2.0.0 | actual: old expected: old
MyApp got:1.2.3 need:1.3.0 | actual: old expected: old
MyApp got:2.0.5 need:2.1.0 | actual: old expected: old
Before change
-------------
MyApp got:1.0.0 need:0.6.0 | actual: old expected: ok <-- error
MyApp got:1.0.0 need:1.0.0 | actual: ok expected: ok
MyApp got:2.0.0 need:1.0.0 | actual: old expected: ok <-- error
MyApp got:1.1.0 need:1.0.0 | actual: ok expected: ok
MyApp got:1.0.1 need:1.0.0 | actual: ok expected: ok
MyApp got:1.0.0 need:2.0.0 | actual: old expected: old
MyApp got:1.0.0 need:1.1.0 | actual: old expected: old
MyApp got:1.0.0 need:1.0.1 | actual: old expected: old
MyApp got:0.9.9 need:1.0.0 | actual: old expected: old
MyApp got:1.9.9 need:2.0.0 | actual: old expected: old
MyApp got:1.2.3 need:1.3.0 | actual: old expected: old
MyApp got:2.0.5 need:2.1.0 | actual: old expected: old
Merge request reports
Activity
added MRStatus::Acceptable label
This is a revert of ee5fad6a (which should be mentioned as such). As explained there, we consider that major versions changes may not be compatible with what we use. But then it was done for a library that is now handled in contribs. Looking at the current list of tools, I think bison may fall in that category. But there is no bison version higher than 3, so we should be OK with this change for a while.
It is definitely needed for meson, although we could raise the minimum to 1.0.0 now that it has been out for a while.
added Component::Build system label
changed milestone to %4.0
added MRStatus::InReview label and removed MRStatus::Acceptable label
Yes, please move that into a new, separate MR, and adjust this MR title/description to reflect what it does now.
It will make review easier, as there might be some discussion about bumping the meson version and people can ne easily see it when it's in this MR "hidden".
Edited by Marvin Scholz
mentioned in merge request !3480 (merged)
added MRStatus::Stale label and removed MRStatus::InReview label