[elbe-devel] [PATCH v3 1/4] elbeproject: Add gen_licenses method

Torben Hohn torben.hohn at linutronix.de
Thu Apr 16 13:13:30 CEST 2020


On Tue, Apr 07, 2020 at 10:42:48AM -0400, Olivier Dion wrote:
> The method sorts the list of packages before generating the license
> files for the RFS.
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>

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

> ---
>  elbepack/elbeproject.py | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 33627711..d3a76fef 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -923,3 +923,15 @@ 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)
> +        pkg_list.sort()
> +
> +        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.26.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