[elbe-devel] [PATCH v3 3/4] Changes to the preprocessor
Torben Hohn
torben.hohn at linutronix.de
Tue Sep 17 18:05:55 CEST 2019
On Tue, Sep 17, 2019 at 03:29:35PM +0200, Akash Satamkar wrote:
> Add a parameter to ElbeXML.archive_tmpfile(), to allow to specify
> the archive to unpack.
this is the third review, where i am pointing out, that this change
only touches code, that is not executed in the preprocessor.
Yet the subject line is still... changes to the preprocessor.
more stuffs inline...
>
> Signed-off-by: Akash Satamkar <akash at linutronix.de>
> ---
> elbepack/dump.py | 5 +++--
> elbepack/elbexml.py | 9 ---------
> 2 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/elbepack/dump.py b/elbepack/dump.py
> index 4642ae92..6b1bfa6f 100644
> --- a/elbepack/dump.py
> +++ b/elbepack/dump.py
> @@ -11,6 +11,7 @@ from datetime import datetime
>
> from apt import Cache
>
> +from elbepack.archivedir import archive_tmpfile
> from elbepack.finetuning import do_finetuning
> from elbepack.filesystem import hostfs
> from elbepack.version import elbe_version
> @@ -194,8 +195,8 @@ def elbe_report(xml, buildenv, cache, targetfs):
>
> report.info("Archive extract")
>
> - if xml.has("archive") and not xml.text("archive") is None:
> - with xml.archive_tmpfile() as fp:
> + if xml.has("archive") and xml.text("archive"):
why is the if changed ?
> + with archive_tmpfile(xml.text("archive")) as fp:
> 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..2dd5c0f4 100644
> --- a/elbepack/elbexml.py
> +++ b/elbepack/elbexml.py
> @@ -12,9 +12,6 @@ import os
> import re
> import urllib2
>
> -from base64 import standard_b64decode
> -from tempfile import NamedTemporaryFile
> -
> from elbepack.treeutils import etree
> from elbepack.validate import validate_xml
> from elbepack.xmldefaults import ElbeDefaults
> @@ -364,12 +361,6 @@ class ElbeXML(object):
> def append_initvm_pkg(self, aptpkg):
> self.append_pkg(aptpkg, 'initvmpkgs')
>
> - def archive_tmpfile(self):
> - fp = NamedTemporaryFile()
> - fp.write(standard_b64decode(self.text("archive")))
> - fp.file.flush()
> - return fp
> -
you remove this function... where does it go ?
> def get_debootstrappkgs_from(self, other):
> tree = self.xml.ensure_child('debootstrappkgs')
> tree.clear()
> --
> 2.20.1
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
More information about the elbe-devel
mailing list