@@ -91,10 +91,10 @@ python do_update_modules() {
licenses_filename = os.path.join(thisdir, f"{bpn}-licenses.inc")
with open(licenses_filename, "w") as f:
f.write(notice)
- f.write('LICENSE += "AND')
+ f.write('LICENSE += "')
if licenses:
- f.write(' ')
- f.write(oe.spdx_license.AndOp.join(licenses).sort().to_string())
+ f.write(oe.spdx_license.AndOp + ' ' +
+ oe.spdx_license.AndOp.join(licenses).sort().to_string())
f.write('"\n\n')
f.write('LIC_FILES_CHKSUM += "\\\n')
for lic in sorted(lic_files_chksum, key=fold_uri):
Fix the no licenses edge case where a trailing "AND" gives a LICENSE value with an invalid format. E.g. github.com/jstemmer/go-junit-report@v2.1.0 where only the tests have external module dependencies. Signed-off-by: Christian Lindeberg <christian.lindeberg@axis.com> --- meta/classes-recipe/go-mod-update-modules.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)