[elbe-devel] [PATCH v2 04/10] init: pass cfg into mako templates used to build Makefile and libvirt.xml
Torben Hohn
torben.hohn at linutronix.de
Tue Apr 17 12:39:35 CEST 2018
the cfg object is not accessible in mako templates.
This prepares the code to access cfg['initvm_domain'] in libvirt.xml.
This is needed when we make the libvirt domain of the initvm configurable.
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