This only affects those who have bypassed npm being disabled in bitbake (post commit 355cd226)
This recent upstream bitbake commit: https://git.openembedded.org/bitbake/commit/?id=2ee0a002cd50eec1a0743c9ced9e07e529c79ddf broke npm install commands within the npm bitbake class since NpmEnvironment.run() expects a list instead of a string. Update the remaining callers to pass list-based commands to avoid: AttributeError: 'str' object has no attribute 'append' Signed-off-by: Eric Meyers <[email protected]> --- meta/classes-recipe/npm.bbclass | 2 +- scripts/lib/recipetool/create_npm.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes-recipe/npm.bbclass b/meta/classes-recipe/npm.bbclass index 7bb791d543..b1183a7ae3 100644 --- a/meta/classes-recipe/npm.bbclass +++ b/meta/classes-recipe/npm.bbclass @@ -300,7 +300,7 @@ python npm_do_compile() { # Pack and install the main package (tarball, _) = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) - cmd = "npm install %s %s" % (shlex.quote(tarball), d.getVar("EXTRA_OENPM")) + cmd = ["npm", "install", tarball] + shlex.split(d.getVar("EXTRA_OENPM") or "") env.run(cmd, args=args) } diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index 8c4cdd5234..4d316d9a55 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py @@ -97,14 +97,14 @@ class NpmRecipeHandler(RecipeHandler): bb.utils.remove(os.path.join(srctree, "node_modules"), recurse=True) env = NpmEnvironment(d, configs=configs) - env.run("npm install", workdir=srctree) + env.run(["npm", "install"], workdir=srctree) def _generate_shrinkwrap(self, d, srctree, dev): """Check and generate the 'npm-shrinkwrap.json' file if needed""" configs = self._npm_global_configs(dev) env = NpmEnvironment(d, configs=configs) - env.run("npm shrinkwrap", workdir=srctree) + env.run(["npm", "shrinkwrap"], workdir=srctree) return os.path.join(srctree, "npm-shrinkwrap.json")
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#238360): https://lists.openembedded.org/g/openembedded-core/message/238360 Mute This Topic: https://lists.openembedded.org/mt/119739647/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
