openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier-oss@weidmueller.com>
To: openembedded-core@lists.openembedded.org
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Subject: [PATCH 08/12] recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM
Date: Thu,  7 Oct 2021 12:13:22 +0200	[thread overview]
Message-ID: <20211007101326.11075-8-stefan.herbrechtsmeier-oss@weidmueller.com> (raw)
In-Reply-To: <20211007101326.11075-1-stefan.herbrechtsmeier-oss@weidmueller.com>

From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

The package.json files doesn't contain any licenses. The name of the
license doesn't comply the license requirements of most liceneses.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
---

 scripts/lib/recipetool/create_npm.py | 10 ----------
 1 file changed, 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):
 
     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")
-- 
2.20.1



  parent reply	other threads:[~2021-10-07 10:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 10:13 [PATCH 01/12] npm: Add support for EXTRA_OENPM arguments Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 02/12] recipetool: Move license md5sums into CSV files Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 03/12] recipetool: Add optional licfiles parameter to guess_license Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 04/12] recipetool: Skip common source files in guess_license Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 05/12] recipetool: Change default paramter fallback_licenses of function split_pkg_licenses from None to [] Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 06/12] recipetool: ignore empty license files Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 07/12] recipetool: Add logger info for missing license entries Stefan Herbrechtsmeier
2021-10-07 10:13 ` Stefan Herbrechtsmeier [this message]
2021-10-07 10:13 ` [PATCH 09/12] recipetool: npm: Pass README as fallback to guess_license if a license is missing Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 10/12] npm: Add variable NPM_NODEDIR with default value Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 11/12] npm: Use configs for npm environment and args for npm run command Stefan Herbrechtsmeier
2021-10-07 10:13 ` [PATCH 12/12] recipetool: Rework crunch_license to recognize more variants Stefan Herbrechtsmeier
     [not found] ` <16ABB8096349B359.21629@lists.openembedded.org>
2021-10-07 15:32   ` [OE-core] [PATCH 09/12] recipetool: npm: Pass README as fallback to guess_license if a license is missing Stefan Herbrechtsmeier
     [not found] ` <16ABB8087E3F11F0.3789@lists.openembedded.org>
2021-10-07 15:33   ` [OE-core] [PATCH 03/12] recipetool: Add optional licfiles parameter to guess_license Stefan Herbrechtsmeier
2021-10-08  7:42 [PATCH 01/12] npm: Add support for EXTRA_OENPM arguments Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 08/12] recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM Stefan Herbrechtsmeier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211007101326.11075-8-stefan.herbrechtsmeier-oss@weidmueller.com \
    --to=stefan.herbrechtsmeier-oss@weidmueller.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).