From d2689b953cf3e9840396b32bd22271354e4b87bc Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Thu, 10 Dec 2009 10:17:22 +0100 Subject: [PATCH] env: store result specific env in result structures Signed-off-by: Gordon Hecker --- local/e2tool.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/local/e2tool.lua b/local/e2tool.lua index 7f0eec0..b14ea4d 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -626,6 +626,23 @@ The newest configuration syntax supported by the tools is %s. return false, e:cat(re) end + -- distribute result specific environment to the results + for r, t in pairs(info.result_env) do + if not info.results[r] then + return false, e:append( + "configured environment for non existent result: %s", r) + end + info.results[r].env = info.results[r].env or {} + for key,val in pairs(t) do + if info.results[r].env[key] then + e2lib.warn("WHINT", "ignoring duplicate environment from global ".. + "configuration for result: %s %s=%s", r, key, val) + else + info.results[r].env[key] = val + end + end + end + -- servers info.server_default_config = { -- default values cachable = true, -- 2.39.5