[elbe-devel] [PATCH 2/3] Transform the <archivedir> tag to <archive>

Akash Satamkar akash at linutronix.de
Wed Sep 4 16:03:19 CEST 2019


The contents in the <archivedir> tag is replaced by the
preprocessor with a base64 encoded archive of the contents
of the directory.

Signed-off-by: Akash Satamkar <akash at linutronix.de>
---
 elbepack/dump.py    | 2 +-
 elbepack/elbexml.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/elbepack/dump.py b/elbepack/dump.py
index d73b3789..180ede30 100644
--- a/elbepack/dump.py
+++ b/elbepack/dump.py
@@ -207,7 +207,7 @@ def elbe_report(xml, buildenv, cache, reportname, errorname, targetfs):
     outf.h2("archive extract")
 
     if xml.has("archive") and not xml.text("archive") is None:
-        with xml.archive_tmpfile() as fp:
+        with xml.archive_tmpfile("archive") as fp:
             outf.do('tar xvfj "%s" -h -C "%s"' % (fp.name, targetfs.path))
         mt_index_postarch = targetfs.mtime_snap()
     else:
diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index 5972600c..9de0fa02 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -364,9 +364,9 @@ class ElbeXML(object):
     def append_initvm_pkg(self, aptpkg):
         self.append_pkg(aptpkg, 'initvmpkgs')
 
-    def archive_tmpfile(self):
+    def archive_tmpfile(self, xpath):
         fp = NamedTemporaryFile()
-        fp.write(standard_b64decode(self.text("archive")))
+        fp.write(standard_b64decode(self.text(xpath)))
         fp.file.flush()
         return fp
 
-- 
2.20.1




More information about the elbe-devel mailing list