mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
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 <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
aee9854734
commit
4ca5b3fcb0
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user