[elbe-devel] [PATCH 1/4] Add gen_licenses method to ElbeProject
Olivier Dion
dion at linutronix.de
Thu Mar 5 06:23:36 CET 2020
Signed-off-by: Olivier Dion <dion 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
More information about the elbe-devel
mailing list