]> git.e2factory.org Git - e2factory.git/commitdiff
verify that the correct version of e2-build is used when --check is passed to e2...
authorGordon Hecker <gh@emlix.com>
Wed, 16 Dec 2009 11:00:33 +0000 (12:00 +0100)
committerGordon Hecker <gh@emlix.com>
Wed, 16 Dec 2009 11:41:58 +0000 (12:41 +0100)
Signed-off-by: Gordon Hecker <gh@emlix.com>
Changelog
local/e2tool.lua

index 0f45b616d9a3c3513eafd77d04fd97d2e4bf39c4..75f450526d9ad0998aa0e25a22924b472f6a1887 100644 (file)
--- 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
index 4926327177cc85d3dc7541287ed5c2959475ce4c..e4f4736b5560b64012c0219d7754119df94a9078 100644 (file)
@@ -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