]> git.e2factory.org Git - e2factory.git/commitdiff
env: store result specific env in result structures
authorGordon Hecker <gh@emlix.com>
Thu, 10 Dec 2009 09:17:22 +0000 (10:17 +0100)
committerGordon Hecker <gh@emlix.com>
Fri, 12 Feb 2010 09:51:56 +0000 (10:51 +0100)
Signed-off-by: Gordon Hecker <gh@emlix.com>
local/e2tool.lua

index 7f0eec09c3e5261001b8788d1f19fc7cd3761ff9..b14ea4deab2b79176d08872e054181fcf6dc1a2b 100644 (file)
@@ -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,