[elbe-devel] [PATCH 3/3] initvmaction: call the preprocessor before "elbe init" is called
Torben Hohn
torben.hohn at linutronix.de
Wed May 29 16:30:52 CEST 2019
the preprocessor was only called for the submit case.
However, <key> urls are not valid anymore, and need to be handled
by the preprocessor.
Use PreprocessWrapper() to call "elbe preprocess" before an xml files
is fed to "elbe init"
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/initvmaction.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index f15b65cd8..c7a2b66a7 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -484,13 +484,14 @@ class CreateAction(InitVMAction):
if not opt.build_sources:
init_opts += ' --skip-build-source'
- if cdrom:
- system('%s init %s --directory "%s" --cdrom "%s" "%s"' %
- (elbe_exe, init_opts, initvmdir, cdrom, xmlfile))
- else:
- system(
- '%s init %s --directory "%s" "%s"' %
- (elbe_exe, init_opts, initvmdir, xmlfile))
+ with PreprocessWrapper(xmlfile, opt) as ppw:
+ if cdrom:
+ system('%s init %s --directory "%s" --cdrom "%s" "%s"' %
+ (elbe_exe, init_opts, initvmdir, cdrom, ppw.preproc))
+ else:
+ system(
+ '%s init %s --directory "%s" "%s"' %
+ (elbe_exe, init_opts, initvmdir, ppw.preproc))
except CommandError:
print("'elbe init' Failed", file=sys.stderr)
--
2.11.0
More information about the elbe-devel
mailing list