From fb0654ef45416bf2284bca7276193d00fb57cf21 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 28 Jun 2016 18:32:30 +0200 Subject: [PATCH] e2tool: error on configured/installed version mismatch Signed-off-by: Tobias Ulmer --- local/e2-build.lua | 13 ------------- local/e2tool.lua | 24 +++++++++--------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/local/e2-build.lua b/local/e2-build.lua index d7ccaf6..bc50db3 100644 --- a/local/e2-build.lua +++ b/local/e2-build.lua @@ -192,19 +192,6 @@ local function e2_build(arg) error(re) end - if opts.release then - local version_table, re = e2lib.parse_e2versionfile( - e2lib.join(info.root, e2lib.globals.e2version_file)) - if not version_table then - error(re) - end - - if version_table.tag == "^" then - error( - err.new("e2 is on a pseudo tag while building in release mode.")) - end - end - -- calculate buildids for selected results for _,r in ipairs(sel_res) do local bid, re = e2tool.buildid(info, r) diff --git a/local/e2tool.lua b/local/e2tool.lua index 127c412..952746b 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -528,22 +528,16 @@ function e2tool.collect_project_info(info, skip_load_config) -- if x86_64 mode is requested. info.chroot_call_prefix["x86_64"] = "" - if e2option.opts["check"] then - local f = e2lib.join(info.root, e2lib.globals.e2version_file) - local v, re = e2lib.parse_e2versionfile(f) - if not v then - return false, re - end + local f = e2lib.join(info.root, e2lib.globals.e2version_file) + local v, re = e2lib.parse_e2versionfile(f) + if not v then + return false, re + end - if v.tag == "^" then - return false, err.new("local tool version is not configured to " .. - "a fixed tag\nfix you configuration in %s before running " .. - "e2factory in release mode", f) - elseif v.tag ~= buildconfig.VERSIONSTRING then - return false, err.new("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 + if v.tag ~= buildconfig.VERSIONSTRING then + return false, err.new("local tool version does not match the " .. + "version configured\n in `%s`\nlocal tool version is %s\n" .. + "required version is %s", f, buildconfig.VERSIONSTRING, v.tag) end -- read environment configuration -- 2.39.5