[elbe-devel] [PATCH 1/4] Add gen_licenses method to ElbeProject

Torben Hohn torben.hohn at linutronix.de
Thu Mar 12 14:37:19 CET 2020


On Thu, Mar 05, 2020 at 12:23:36AM -0500, Olivier Dion wrote:
> Signed-off-by: Olivier Dion <dion at linutronix.de>

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

> ---
>  elbepack/elbeproject.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index b64a5fcb..4a445f86 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -923,3 +923,14 @@ class ElbeProject (object):
>              except SystemError as e:
>                  logging.exception("Commiting changes failed")
>                  raise AptCacheCommitError(str(e))
> +
> +    def gen_licenses(self, rfs, env, pkg_list):
> +
> +        lic_txt_fname = os.path.join(self.builddir,
> +                                     "licence-%s.txt" % rfs)
> +        lic_xml_fname = os.path.join(self.builddir,
> +                                     "licence-%s.xml" % rfs)
> +
> +        with io.open(lic_txt_fname, 'w+',
> +                     encoding='utf-8', errors='replace') as f:
> +            env.rfs.write_licenses(f, pkg_list, lic_xml_fname)
> -- 
> 2.25.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