]> code.ossystems Code Review - openembedded-core.git/commitdiff
npm.bbclass: avoid building target nodejs for native npm recipes
authorYoann Congal <yoann.congal@smile.fr>
Tue, 9 Feb 2021 15:53:46 +0000 (16:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 12 Feb 2021 23:32:11 +0000 (23:32 +0000)
The current recipe unconditionally RDEPENDS on nodejs (the target one).
When building on the "-native recipe" of "BBCLASSEXTEND native" recipe,
the target nodejs is unnecessarily built.

This patch fixes this by only RDEPENDS on nodejs when building for the target.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/npm.bbclass

index 79f55febccf2389ad5d5cacfb6b55c1f88db9c8f..55a6985fb029e6ff38557025645c9b39e9474028 100644 (file)
@@ -20,7 +20,7 @@
 inherit python3native
 
 DEPENDS_prepend = "nodejs-native "
-RDEPENDS_${PN}_prepend = "nodejs "
+RDEPENDS_${PN}_append_class-target = " nodejs"
 
 NPM_INSTALL_DEV ?= "0"