[elbe-devel] [PATCH v2 2/6] initvmaction: dont extract elbe-keyring.gpg to /tmp
Torben Hohn
torben.hohn at linutronix.de
Wed Sep 26 12:13:48 CEST 2018
elbe-keyring.gpg is extracted from the cdrom into /tmp and
moved into out_path in "elbe init". The file does not seem to be cleaned
up properly.
Directly extract elbe-keyring.gpg from the iso into the out_dir in
elbe init.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/commands/init.py | 8 +++-----
elbepack/initvmaction.py | 12 ------------
2 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
index 140d9e18..9445c69d 100644
--- a/elbepack/commands/init.py
+++ b/elbepack/commands/init.py
@@ -200,11 +200,9 @@ def run_command(argv):
os.path.join(out_path, "source.xml"))
if opt.cdrom:
- shutil.move(
- "/tmp/elbe-keyring.gpg",
- os.path.join(
- out_path,
- "elbe-keyring.gpg"))
+ os.system(
+ '7z x -o%s "%s" elbe-keyring.gpg' %
+ (out_path, opt.cdrom))
if opt.devel:
os.system(
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 8f9929cd..5597de13 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -469,18 +469,6 @@ class CreateAction(InitVMAction):
# We have an iso image, extract xml from there.
tmp = extract_cdrom(args[0])
- # After extracting the source.xml,
- # we also extract the elbe-keyring here.
- #
- # this only happens for "initvm create"
- # not for "initvm submit"
- os.system(
- '7z x -o%s "%s" elbe-keyring.gpg' %
- ('/tmp', args[0]))
-
- if tmp.isfile('elbe-keyring.gpg'):
- print("Iso image contains a elbe-kerying")
-
xmlfile = tmp.fname('source.xml')
cdrom = args[0]
else:
--
2.11.0
More information about the elbe-devel
mailing list