summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-04-21 15:30:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 15:15:47 +0100
commitb7ab82485e4514e07ab8a76e554da27ddc92e6c0 (patch)
tree4730c6378dffbfb6f8cf5cf3e189ba21fddef24b
parenta3bb5bd25b72bd1bcc156dabd0ffa2d9184bb160 (diff)
downloadopenembedded-core-b7ab82485e4514e07ab8a76e554da27ddc92e6c0.tar.gz
openembedded-core-b7ab82485e4514e07ab8a76e554da27ddc92e6c0.tar.bz2
openembedded-core-b7ab82485e4514e07ab8a76e554da27ddc92e6c0.zip
devtool: modify: make bitbake use local files from srctree
This change makes it possible to have local files (non-remote SRC_URI files, i.e. files that are located in the "recipe space") under the srctree even if S!=WORKDIR. The files must be placed under the 'local-files' subdirectory. Complements the previous patch that imports local files into srctree. [YOCTO #7602] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--scripts/lib/devtool/standard.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 0c67c131a8..20eafec052 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -558,8 +558,13 @@ def modify(args, config, basepath, workspace):
if not os.path.exists(appendpath):
os.makedirs(appendpath)
with open(appendfile, 'w') as f:
- f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n\n')
- f.write('inherit externalsrc\n')
+ f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n')
+ # Local files can be modified/tracked in separate subdir under srctree
+ # Mostly useful for packages with S != WORKDIR
+ f.write('FILESPATH_prepend := "%s:"\n' %
+ os.path.join(srctree, 'local-files'))
+
+ f.write('\ninherit externalsrc\n')
f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
f.write('EXTERNALSRC_pn-%s = "%s"\n' % (args.recipename, srctree))