[elbe-devel] [PATCH v2 4/5] db: Add licenses for project' files

Olivier Dion dion at linutronix.de
Sun Mar 15 22:12:14 CET 2020


Some files, e.g. licence-sysroot.{txt, xml} could not exists in the
projects.  This is the case for example when no SDK is built.  However
this is okay and doesn't generate any error.

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/db.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/elbepack/db.py b/elbepack/db.py
index 8168301c..a8b48141 100644
--- a/elbepack/db.py
+++ b/elbepack/db.py
@@ -834,13 +834,15 @@ class ElbeDB(object):
                                       "application/xml",
                                       "Current source.xml of the project")
 
-            _update_project_file(s, p.builddir, "licence.txt",
-                                      "text/plain; charset=utf-8",
-                                      "License file")
+            for name in ["chroot", "target", "sysroot-target", "sysroot-host"]:
 
-            _update_project_file(s, p.builddir, "licence.xml",
-                                      "application/xml",
-                                      "xml License file")
+                _update_project_file(s, p.builddir, "licence-%s.txt" % name,
+                                     "text/plain; charset=utf-8",
+                                     "License file")
+
+                _update_project_file(s, p.builddir, "licence-%s.xml" % name,
+                                     "application/xml",
+                                     "xml License file")
 
             _update_project_file(s, p.builddir, "validation.txt",
                                       "text/plain; charset=utf-8",
-- 
2.25.1




More information about the elbe-devel mailing list