poky/scripts/lib
Enguerrand de Ribaucourt 0a0caacfa5 recipetool: create_npm: reuse license utils
create_npm.py duplicated the logic for matching licenses from files and
also finding them. This patch refactors the code to reuse the license
utils. This will make the code more maintainable and also align both
behaviors. For instance, some licenses weren't matched properly because
the duplicate logic did not support the difference in format in the md5
tables for COMMON_LICENSE_DIR and licenses.csv.

This is also faster since the license files were being read twice.
The result is slightly more accurate since the utils have better
implementations, and I was able to reuse the logic for the root PN
package, as well as the base LICENSE variable.

I chose to extract generate_common_licenses_chksums into create.py
since it can be considered a general utility function to allow
other recipetool creators to refer to COMMON_LICENSE_DIR files.

I updated the wording in the code when appropriate.

v3:
 - added commit
 - this replaces the commit that added all the COMMON_LICENSE_DIR md5
   to licenses.csv

(From OE-Core rev: 7bc18bed63b94689890bcde63402d7cc1cedffa9)

Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-23 09:51:36 +01:00
..
build_perf oe-build-perf-report: Add commit hash link to chart tooltip 2024-05-24 16:59:31 +01:00
checklayer scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
devtool devtool/upgrade: rename RECIPE_UPDATE_EXTRA_TASKS -> RECIPE_UPGRADE_EXTRA_TASKS 2024-08-03 07:56:10 +01:00
recipetool recipetool: create_npm: reuse license utils 2024-08-23 09:51:36 +01:00
resulttool scripts/resulttool: group all regressions in regression report 2023-11-05 08:44:06 +00:00
wic bootimg-partition: break out code to a common library. 2024-07-23 11:17:11 +01:00
argparse_oe.py scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
buildstats.py scripts/lib/buildstats: handle top-level build_stats not being complete 2023-03-25 09:39:28 +00:00
scriptpath.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
scriptutils.py recipetool/devtool: Update to work correctly with UNPACKDIR 2024-05-22 22:26:30 +01:00