[oe-commits] [openembedded-core] 27/35: npm: remove some temporary build files

git at git.openembedded.org git at git.openembedded.org
Fri Jun 7 12:58:36 UTC 2019

This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch warrior
in repository openembedded-core.

commit b03743b0f843736c6ebe8077e1e03bc03ac39410
Author: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
AuthorDate: Fri May 17 17:14:10 2019 +0200

    npm: remove some temporary build files
    Fixes [YOCTO #11028]
    When dealing with node modules which use "node-gyp" [1] to build native
    addons to node. Some temporary build files stay in the image: object
    files, static library files, dependency files, ...
    This commit does not keep only the required files, but remove the files
    which can leads to QA issues (staticdev with static library files).
    [1]: https://github.com/nodejs/node-gyp
    Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
 meta/classes/npm.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index 9703f4c..4b1f0a3 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -56,6 +56,7 @@ npm_do_install() {
 	local NPM_PACKFILE=$(npm pack .)
 	npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPM_PACKFILE}
 	ln -fs node_modules ${D}${libdir}/node
+	find ${D}${NPM_INSTALLDIR} -type f \( -name "*.a" -o -name "*.d" -o -name "*.o" \) -delete
 	if [ -d ${D}${prefix}/etc ] ; then
 		# This will be empty
 		rmdir ${D}${prefix}/etc

To stop receiving notification emails like this one, please contact
the administrator of this repository.

More information about the Openembedded-commits mailing list