diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-03-21 18:14:04 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:13 +0000 |
commit | 11c1d30152ad2c6461d8c3638add4d97b90e8c46 (patch) | |
tree | f00adc8d8b2f1d98eca0928bb12ddd29e620cca0 /meta/classes/npm.bbclass | |
parent | 552a68ad1c33c516cfe3aa79e1e8ab25eeeef3b9 (diff) | |
download | poky-11c1d30152ad2c6461d8c3638add4d97b90e8c46.tar.gz |
devtool: add: delete externalsrc files on npm recipe do_install
The npm class just installs whatever is in ${S}; if you're using
externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs
by default) plus singletask.lock will end up in the final package, which
isn't really right. Introduce a variable so we know the path the files
will be installed into within npm.bbclass, and append to do_install
within the workspace bbappend to delete the files.
(From OE-Core rev: 766845e06db9d7d595e836ea1364c16fa132a413)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/npm.bbclass')
-rw-r--r-- | meta/classes/npm.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index b5db99d2b9..33ff5e3f45 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass | |||
@@ -1,6 +1,8 @@ | |||
1 | DEPENDS_prepend = "nodejs-native " | 1 | DEPENDS_prepend = "nodejs-native " |
2 | S = "${WORKDIR}/npmpkg" | 2 | S = "${WORKDIR}/npmpkg" |
3 | 3 | ||
4 | NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}" | ||
5 | |||
4 | npm_do_compile() { | 6 | npm_do_compile() { |
5 | # changing the home directory to the working directory, the .npmrc will | 7 | # changing the home directory to the working directory, the .npmrc will |
6 | # be created in this directory | 8 | # be created in this directory |
@@ -14,8 +16,8 @@ npm_do_compile() { | |||
14 | } | 16 | } |
15 | 17 | ||
16 | npm_do_install() { | 18 | npm_do_install() { |
17 | mkdir -p ${D}${libdir}/node_modules/${PN}/ | 19 | mkdir -p ${NPM_INSTALLDIR}/ |
18 | cp -a ${S}/* ${D}${libdir}/node_modules/${PN}/ --no-preserve=ownership | 20 | cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership |
19 | } | 21 | } |
20 | 22 | ||
21 | python populate_packages_prepend () { | 23 | python populate_packages_prepend () { |