[elbe-devel] [PATCH v2 12/15] Change os.sytem to shellhelper::system for "updatedpkg.py"

Torben Hohn torben.hohn at linutronix.de
Tue Jun 25 14:04:23 CEST 2019


On Mon, Jun 24, 2019 at 05:39:09PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/updatepkg.py | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/elbepack/updatepkg.py b/elbepack/updatepkg.py
> index b41cffe0..4c848a55 100644
> --- a/elbepack/updatepkg.py
> +++ b/elbepack/updatepkg.py
> @@ -14,6 +14,7 @@ from elbepack.elbexml import ElbeXML
>  from elbepack.dump import dump_fullpkgs
>  from elbepack.ziparchives import create_zip_archive
>  from elbepack.repomanager import UpdateRepo
> +from elbepack.shellhelper import system
>  
>  
>  class MissingData(Exception):
> @@ -109,7 +110,7 @@ def gen_update_pkg(project, xml_filename, upd_filename,
>      if os.path.exists(update):
>          rmtree(update)
>  
> -    os.system('mkdir -p %s' % update)
> +    system('mkdir -p %s' % update)
>  
>      if xml_filename:
>          repodir = os.path.join(update, "repo")
> @@ -128,14 +129,10 @@ def gen_update_pkg(project, xml_filename, upd_filename,
>          dump_fullpkgs(project.xml, project.buildenv.rfs, cache)
>  
>          project.xml.xml.write(os.path.join(update, "new.xml"))
> -        os.system(
> -            "cp %s %s" %
> -            (xml_filename,
> -             os.path.join(
> -                 update,
> -                 "base.xml")))
> +        system("cp %s %s" % (xml_filename,
> +                             os.path.join(update, "base.xml")))
>      else:
> -        os.system("cp source.xml update/new.xml")
> +        system("cp source.xml update/new.xml")
>  
>      if project.presh_file:
>          copyfile(project.presh_file, update + '/pre.sh')
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> 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