mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
a34d0d539e
commit
e90cd2ed61
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user