From 4ca5b3fcb04d0f693ee1de4f19b8c9eb3b15b5ef Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Fri, 8 Oct 2021 09:48:31 +0200 Subject: recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM The package.json files doesn't contain any licenses. The name of the license doesn't comply the license requirements of most liceneses. (From OE-Core rev: 194df9c240378b6befeb10183889093ec7bb4d5f) Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- scripts/lib/recipetool/create_npm.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'scripts/lib/recipetool/create_npm.py') diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index 2bcae91dfa..c939780931 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py @@ -115,17 +115,9 @@ class NpmRecipeHandler(RecipeHandler): def _handle_licenses(self, srctree, shrinkwrap_file, dev): """Return the extra license files and the list of packages""" - licfiles = [] packages = {} - def _licfiles_append(licfile): - """Append 'licfile' to the license files list""" - licfilepath = os.path.join(srctree, licfile) - licmd5 = bb.utils.md5_file(licfilepath) - licfiles.append("file://%s;md5=%s" % (licfile, licmd5)) - # Handle the parent package - _licfiles_append("package.json") packages["${PN}"] = "" # Handle the dependencies @@ -133,7 +125,6 @@ class NpmRecipeHandler(RecipeHandler): suffix = "-".join([self._npm_name(dep) for dep in deptree]) destdirs = [os.path.join("node_modules", dep) for dep in deptree] destdir = os.path.join(*destdirs) - _licfiles_append(os.path.join(destdir, "package.json")) packages["${PN}-" + suffix] = destdir with open(shrinkwrap_file, "r") as f: @@ -246,7 +237,6 @@ class NpmRecipeHandler(RecipeHandler): bb.note("Handling licences ...") (licfiles, packages) = self._handle_licenses(srctree, shrinkwrap_file, dev) - extravalues["LIC_FILES_CHKSUM"] = licfiles split_pkg_licenses(guess_license(srctree, d), packages, lines_after, []) classes.append("npm") -- cgit v1.2.3-54-g00ecf