poky/scripts/lib/recipetool
Enguerrand de Ribaucourt 01d17cd5d4 recipetool: create_npm: resolve licenses defined in package.json
Some npm packages do not copy the LICENSE or COPY file into their
git repository. They'll instead simply use SPDX identifiers in their
package.json. A fallback for those repositories attempted to match
the README file to a license file instead, which had a very low
probability of success.

This commit replaces this fallback with parsing the package.json and
looking for the license in COMMON_LICENSE_DIR. If the license is not
found, "Unknown" will still be produced.

This also generates "Unknown" for packages which had no README file,
which could silently not appear in the generated recipe. The user was
more likely to miss them.

Co-authored-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
(From OE-Core rev: 445604cfc4a5813ea635f18053cd1f673bf0b830)

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
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
..
__init__.py scripts/recipetool: Add a recipe auto-creation script 2014-12-23 10:18:15 +00:00
append.py classes/lib/scripts: Initial WORKDIR -> UNPACKDIR updates 2024-05-02 15:15:51 +01:00
create_buildsys_python.py recipetool; add support for python_mesonpy class 2024-02-20 11:39:45 +00:00
create_buildsys.py scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
create_go.py recipetool: Handle several go-import tags in go resolver 2024-04-23 13:40:24 +01:00
create_kernel.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
create_kmod.py Convert to new override syntax 2021-08-02 15:44:10 +01:00
create_npm.py recipetool: create_npm: resolve licenses defined in package.json 2024-08-23 09:51:36 +01:00
create.py recipetool/devtool: Update to work correctly with UNPACKDIR 2024-05-22 22:26:30 +01:00
edit.py recipetool: Fix list concatenation when using edit 2020-06-15 14:53:45 +01:00
licenses.csv recipetool/devtool: Further SPDX identifier cleanups 2022-03-02 18:43:24 +00:00
newappend.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
setvar.py recipetool/devtool: Ensure server knows about changed files 2023-09-18 11:35:38 +01:00