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

Torben Hohn torben.hohn at linutronix.de
Tue Jun 25 13:58:12 CEST 2019


this one is only used by elbe toolchainextract, and should also be
dropped.


On Mon, Jun 24, 2019 at 05:39:04PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
>  elbepack/debpkg.py | 21 +++++++++------------
>  1 file changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/elbepack/debpkg.py b/elbepack/debpkg.py
> index ede724cc..7fa5da1e 100644
> --- a/elbepack/debpkg.py
> +++ b/elbepack/debpkg.py
> @@ -9,6 +9,8 @@ import string
>  
>  from tempfile import mkdtemp
>  
> +from elbepack.shellhelper import system
> +
>  control_template_string = """Package: ${name}
>  Version: ${version}
>  Section: main
> @@ -55,7 +57,7 @@ def build_binary_deb(
>      pkgfname = "%s_%s_%s" % (name, version, arch)
>      pkgdir = os.path.join(tmpdir, pkgfname)
>  
> -    os.system('mkdir -p "%s"' % os.path.join(pkgdir, "DEBIAN"))
> +    system('mkdir -p "%s"' % os.path.join(pkgdir, "DEBIAN"))
>      write_file(
>          os.path.join(
>              pkgdir,
> @@ -71,19 +73,14 @@ def build_binary_deb(
>  
>      for (fname, instpath) in files:
>          full_instpath = os.path.join(pkgdir, instpath)
> -        os.system('mkdir -p "%s"' % full_instpath)
> -        os.system('cp -a "%s" "%s"' % (fname, full_instpath))
> +        system('mkdir -p "%s"' % full_instpath)
> +        system('cp -a "%s" "%s"' % (fname, full_instpath))
>  
> -    os.system('dpkg-deb --build "%s"' % pkgdir)
> +    system('dpkg-deb --build "%s"' % pkgdir)
>  
> -    os.system(
> -        'cp -v "%s" "%s"' %
> -        (os.path.join(
> -            tmpdir,
> -            pkgfname +
> -            ".deb"),
> -            target_dir))
> +    system('cp -v "%s" "%s"' % (os.path.join(tmpdir, pkgfname + ".deb"),
> +                                target_dir))
>  
> -    os.system('rm -r "%s"' % tmpdir)
> +    system('rm -r "%s"' % tmpdir)
>  
>      return pkgfname + ".deb"
> -- 
> 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