From 3dc8837f7a00c20225708c688002b6a22d8f9887 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Wed, 16 Dec 2009 12:00:33 +0100 Subject: [PATCH] verify that the correct version of e2-build is used when --check is passed to e2-build Signed-off-by: Gordon Hecker --- Changelog | 2 ++ local/e2tool.lua | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Changelog b/Changelog index 0f45b61..75f4505 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,8 @@ NEXT: * introduce a hash cache depending on timestamps to further speed up BuildId calculation * release mode verifies hashes for server side files + * release mode checks that the correct version of e2factory is used with + a project e2factory-2.3.2 * temporary build directories are located in a version specific directory diff --git a/local/e2tool.lua b/local/e2tool.lua index 4926327..e4f4736 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -455,6 +455,24 @@ The newest configuration syntax supported by the tools is %s. return false, e:cat(re) end + if e2option.opts["check"] then + local f = ".e2/e2version" + local v = e2lib.parse_e2versionfile(f) + if v.tag == "^" then + e2lib.abort(string.format( + "local tool version is not configured to a fixed tag\n".. + "fix you configuration in %s before running e2factory in release mode", + f)) + elseif v.tag ~= buildconfig.VERSIONSTRING then + e2lib.abort(string.format( + "local tool version does not match the version configured\n".. + "in `%s`\n".. + "local tool version is %s\n".. + "required version is %s", + f, buildconfig.VERSIONSTRING, v.tag)) + end + end + info.sources = {} -- read project environment file -- 2.39.5