aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-09-15 09:52:07 -0400
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-09-21 18:09:12 +0200
commitca866bcfc715fb39255e649a30a7fc02ad6ca8e2 (patch)
treee463779c6ad4d6488008deb1ac9c64c398ba1cc1 /mesonbuild
parentea4b99947387b8f82073d0ee746445a478d7de95 (diff)
downloadmeson-ca866bcfc715fb39255e649a30a7fc02ad6ca8e2.zip
meson-ca866bcfc715fb39255e649a30a7fc02ad6ca8e2.tar.gz
meson-ca866bcfc715fb39255e649a30a7fc02ad6ca8e2.tar.bz2
coredata: 0.59.1 -> 0.59.99 is a major version difference
Remove test_minor_version_does_not_reconfigure_wipe() because when run during dev cycle that test reconfigure with .99 -> .100 which is considered a major version change now. It is covered by a more efficient internal test now anyway. While at it, remove no-op `with Path(self.builddir):` statement, the intention was clearly to set workdir. Fixes: #9260
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/coredata.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 20a4ccb..3abba6d 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -43,6 +43,7 @@ if T.TYPE_CHECKING:
KeyedOptionDictType = T.Union[T.Dict['OptionKey', 'UserOption[T.Any]'], OptionOverrideProxy]
CompilerCheckCacheKey = T.Tuple[T.Tuple[str, ...], str, FileOrString, T.Tuple[str, ...], str]
+# Check major_versions_differ() if changing versioning scheme.
version = '0.59.99'
backendlist = ['ninja', 'vs', 'vs2010', 'vs2012', 'vs2013', 'vs2015', 'vs2017', 'vs2019', 'xcode']
@@ -990,7 +991,10 @@ def format_cmd_line_options(options: argparse.Namespace) -> str:
return ' '.join([shlex.quote(x) for x in cmdline])
def major_versions_differ(v1: str, v2: str) -> bool:
- return v1.split('.')[0:2] != v2.split('.')[0:2]
+ v1_major, v1_minor = v1.rsplit('.', 1)
+ v2_major, v2_minor = v2.rsplit('.', 1)
+ # Major version differ, or one is development version but not the other.
+ return v1_major != v2_major or ('99' in {v1_minor, v2_minor} and v1_minor != v2_minor)
def load(build_dir: str) -> CoreData:
filename = os.path.join(build_dir, 'meson-private', 'coredata.dat')