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 /scripts/lib/devtool/standard.py | |
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 'scripts/lib/devtool/standard.py')
-rw-r--r-- | scripts/lib/devtool/standard.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 7600a8fa1f..9ac2ad57a8 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -238,6 +238,17 @@ def add(args, config, basepath, workspace): | |||
238 | f.write(' rm -f ${D}/singletask.lock\n') | 238 | f.write(' rm -f ${D}/singletask.lock\n') |
239 | f.write('}\n') | 239 | f.write('}\n') |
240 | 240 | ||
241 | if bb.data.inherits_class('npm', rd): | ||
242 | f.write('do_install_append() {\n') | ||
243 | f.write(' # Remove files added to source dir by devtool/externalsrc\n') | ||
244 | f.write(' rm -f ${NPM_INSTALLDIR}/singletask.lock\n') | ||
245 | f.write(' rm -rf ${NPM_INSTALLDIR}/.git\n') | ||
246 | f.write(' rm -rf ${NPM_INSTALLDIR}/oe-local-files\n') | ||
247 | f.write(' for symlink in ${EXTERNALSRC_SYMLINKS} ; do\n') | ||
248 | f.write(' rm -f ${NPM_INSTALLDIR}/${symlink%%:*}\n') | ||
249 | f.write(' done\n') | ||
250 | f.write('}\n') | ||
251 | |||
241 | _add_md5(config, recipename, appendfile) | 252 | _add_md5(config, recipename, appendfile) |
242 | 253 | ||
243 | logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile) | 254 | logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile) |