]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: modify: make bitbake use local files from srctree
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 21 Apr 2015 12:30:35 +0000 (15:30 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Sep 2015 14:15:47 +0000 (15:15 +0100)
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>
scripts/lib/devtool/standard.py

index 0c67c131a81f1d6961725eb4340344bd3f7ac27d..20eafec05220cfc6af5da54221c90ceebdd712fb 100644 (file)
@@ -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))