From: Gordon Hecker Date: Thu, 10 Dec 2009 09:17:22 +0000 (+0100) Subject: env: store result specific env in result structures X-Git-Tag: e2factory-2.3.4pre1~69 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=d2689b953cf3e9840396b32bd22271354e4b87bc;p=e2factory.git env: store result specific env in result structures Signed-off-by: Gordon Hecker --- 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,