[elbe-devel] [PATCH 4/7] init: pass cfg into mako templates used to build Makefile and libvirt.xml

Torben Hohn torben.hohn at linutronix.de
Fri Apr 13 14:43:13 CEST 2018


this is needed to access cfg['initvm_domain'] in libvirt.xml

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/commands/init.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
index fb723abd..39a4ab98 100644
--- a/elbepack/commands/init.py
+++ b/elbepack/commands/init.py
@@ -29,6 +29,7 @@ from elbepack.xmldefaults import ElbeDefaults
 from elbepack.version import elbe_version
 from elbepack.templates import write_template, get_initvm_preseed
 from elbepack.directories import init_template_dir, elbe_dir
+from elbepack.config import cfg
 
 from optparse import OptionParser
 
@@ -161,7 +162,8 @@ def run_command(argv):
          "prj": xml.node("/initvm"),
          "http_proxy": http_proxy,
          "pkgs": xml.node("/initvm/pkg-list") or [],
-         "preseed": get_initvm_preseed(xml)}
+         "preseed": get_initvm_preseed(xml),
+         "cfg": cfg}
 
     if http_proxy != "":
         os.putenv("http_proxy", http_proxy)
-- 
2.11.0




More information about the elbe-devel mailing list