[elbe-devel] [PATCH 1/2] initvm/create: fix source.xml access/usage

John Ogness john.ogness at linutronix.de
Mon Nov 20 15:05:57 CET 2017


The source.xml file is stored in the tmp directory, not in the
local working directory.

The set_xml command expects the project ID and XML file as
separate parameters. Remove coupling quotes.

Signed-off-by: John Ogness <john.ogness at linutronix.de>
---
 elbepack/initvmaction.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 1aa1ff57..dff10578 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -332,7 +332,7 @@ class CreateAction(InitVMAction):
                 exampl = args[0]
             elif cdrom is not None:
                 ret, prjdir, err = command_out_stderr ('%s control create_project' % (elbe_exe))
-                exampl = 'source.xml'
+                exampl = tmp.fname ('source.xml')
             else:
                 ret, prjdir, err = command_out_stderr ('%s control create_project' % (elbe_exe))
 
@@ -344,7 +344,7 @@ class CreateAction(InitVMAction):
 
             prjdir = prjdir.strip()
 
-            ret, msg, err = command_out_stderr ('%s control set_xml "%s %s"' % (elbe_exe, prjdir, exampl))
+            ret, msg, err = command_out_stderr ('%s control set_xml %s %s' % (elbe_exe, prjdir, exampl))
             if ret != 0:
                 print ("elbe control set_xml failed.", file=sys.stderr)
                 print (err, file=sys.stderr)
-- 
2.14.0



More information about the elbe-devel mailing list