summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2021-10-08 09:48:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 11:48:45 +0100
commit4ca5b3fcb04d0f693ee1de4f19b8c9eb3b15b5ef (patch)
tree3977db7111eeceb245b11f5ff51b84fe37573a4a /scripts/lib
parentaee9854734ca3d78ccdb351c16fca4de5f1688e7 (diff)
downloadpoky-4ca5b3fcb04d0f693ee1de4f19b8c9eb3b15b5ef.tar.gz
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>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/recipetool/create_npm.py10
1 files changed, 0 insertions, 10 deletions
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):
115 115
116 def _handle_licenses(self, srctree, shrinkwrap_file, dev): 116 def _handle_licenses(self, srctree, shrinkwrap_file, dev):
117 """Return the extra license files and the list of packages""" 117 """Return the extra license files and the list of packages"""
118 licfiles = []
119 packages = {} 118 packages = {}
120 119
121 def _licfiles_append(licfile):
122 """Append 'licfile' to the license files list"""
123 licfilepath = os.path.join(srctree, licfile)
124 licmd5 = bb.utils.md5_file(licfilepath)
125 licfiles.append("file://%s;md5=%s" % (licfile, licmd5))
126
127 # Handle the parent package 120 # Handle the parent package
128 _licfiles_append("package.json")
129 packages["${PN}"] = "" 121 packages["${PN}"] = ""
130 122
131 # Handle the dependencies 123 # Handle the dependencies
@@ -133,7 +125,6 @@ class NpmRecipeHandler(RecipeHandler):
133 suffix = "-".join([self._npm_name(dep) for dep in deptree]) 125 suffix = "-".join([self._npm_name(dep) for dep in deptree])
134 destdirs = [os.path.join("node_modules", dep) for dep in deptree] 126 destdirs = [os.path.join("node_modules", dep) for dep in deptree]
135 destdir = os.path.join(*destdirs) 127 destdir = os.path.join(*destdirs)
136 _licfiles_append(os.path.join(destdir, "package.json"))
137 packages["${PN}-" + suffix] = destdir 128 packages["${PN}-" + suffix] = destdir
138 129
139 with open(shrinkwrap_file, "r") as f: 130 with open(shrinkwrap_file, "r") as f:
@@ -246,7 +237,6 @@ class NpmRecipeHandler(RecipeHandler):
246 237
247 bb.note("Handling licences ...") 238 bb.note("Handling licences ...")
248 (licfiles, packages) = self._handle_licenses(srctree, shrinkwrap_file, dev) 239 (licfiles, packages) = self._handle_licenses(srctree, shrinkwrap_file, dev)
249 extravalues["LIC_FILES_CHKSUM"] = licfiles
250 split_pkg_licenses(guess_license(srctree, d), packages, lines_after, []) 240 split_pkg_licenses(guess_license(srctree, d), packages, lines_after, [])
251 241
252 classes.append("npm") 242 classes.append("npm")