mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
552a68ad1c
commit
11c1d30152
@@ -238,6 +238,17 @@ def add(args, config, basepath, workspace):
|
||||
f.write(' rm -f ${D}/singletask.lock\n')
|
||||
f.write('}\n')
|
||||
|
||||
if bb.data.inherits_class('npm', rd):
|
||||
f.write('do_install_append() {\n')
|
||||
f.write(' # Remove files added to source dir by devtool/externalsrc\n')
|
||||
f.write(' rm -f ${NPM_INSTALLDIR}/singletask.lock\n')
|
||||
f.write(' rm -rf ${NPM_INSTALLDIR}/.git\n')
|
||||
f.write(' rm -rf ${NPM_INSTALLDIR}/oe-local-files\n')
|
||||
f.write(' for symlink in ${EXTERNALSRC_SYMLINKS} ; do\n')
|
||||
f.write(' rm -f ${NPM_INSTALLDIR}/${symlink%%:*}\n')
|
||||
f.write(' done\n')
|
||||
f.write('}\n')
|
||||
|
||||
_add_md5(config, recipename, appendfile)
|
||||
|
||||
logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)
|
||||
|
||||
Reference in New Issue
Block a user