summaryrefslogtreecommitdiffstats
path: root/meta/classes/npm.bbclass
diff options
context:
space:
mode:
authorJean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>2019-05-17 17:14:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-21 12:56:33 +0100
commite90cd2ed61b93ee7e290e7e592f1f0242ab5c281 (patch)
tree6c381e98e02b39c99aa12b94c7fdb174726e7ee6 /meta/classes/npm.bbclass
parenta34d0d539e5fdf341541fb628652d22289e80512 (diff)
downloadpoky-e90cd2ed61b93ee7e290e7e592f1f0242ab5c281.tar.gz
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 (From OE-Core rev: bac9075f51f6acba2fcfbe9f79f97f5171186d9c) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/npm.bbclass')
-rw-r--r--meta/classes/npm.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index 9703f4c1ec..4b1f0a39f0 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -56,6 +56,7 @@ npm_do_install() {
56 local NPM_PACKFILE=$(npm pack .) 56 local NPM_PACKFILE=$(npm pack .)
57 npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPM_PACKFILE} 57 npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPM_PACKFILE}
58 ln -fs node_modules ${D}${libdir}/node 58 ln -fs node_modules ${D}${libdir}/node
59 find ${D}${NPM_INSTALLDIR} -type f \( -name "*.a" -o -name "*.d" -o -name "*.o" \) -delete
59 if [ -d ${D}${prefix}/etc ] ; then 60 if [ -d ${D}${prefix}/etc ] ; then
60 # This will be empty 61 # This will be empty
61 rmdir ${D}${prefix}/etc 62 rmdir ${D}${prefix}/etc