diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2019-04-03 05:37:02 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-09 13:44:39 +0100 |
commit | 89c4424d6d875e102ca324d3b81426b4466dccc5 (patch) | |
tree | 0b811eb30e2d9595839d48226de148de29a65f32 | |
parent | 9e685e2591c81c28c4fe27d8554af78b52f3a1dc (diff) | |
download | poky-89c4424d6d875e102ca324d3b81426b4466dccc5.tar.gz |
devtool: standard: Handle exporting generated config fragments
The cml1 and ccmake bbclasses generate configuration fragment source
files that must be exported from the WORKDIR as a source file to be
preserved across builds. This change adds detection of the current
recipes inherited classes and for cml1 and ccmake classes checks for the
specific generated configuration fragment files. These files are then
exported by devtool and included as SRC_URI files from within the target
layer.
(From OE-Core rev: 7a1fabe4a24552ce8a50c8d6009969ca52a5fd27)
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/devtool/standard.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index ea09bbff31..0a1e329e61 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -1328,6 +1328,20 @@ def _export_local_files(srctree, rd, destdir, srctreebase): | |||
1328 | if os.path.exists(os.path.join(local_files_dir, fragment_fn)): | 1328 | if os.path.exists(os.path.join(local_files_dir, fragment_fn)): |
1329 | os.unlink(os.path.join(local_files_dir, fragment_fn)) | 1329 | os.unlink(os.path.join(local_files_dir, fragment_fn)) |
1330 | 1330 | ||
1331 | # Special handling for cml1, ccmake, etc bbclasses that generated | ||
1332 | # configuration fragment files that are consumed as source files | ||
1333 | for frag_class, frag_name in [("cml1", "fragment.cfg"), ("ccmake", "site-file.cmake")]: | ||
1334 | if bb.data.inherits_class(frag_class, rd): | ||
1335 | srcpath = os.path.join(rd.getVar('WORKDIR'), frag_name) | ||
1336 | if os.path.exists(srcpath): | ||
1337 | if frag_name not in new_set: | ||
1338 | new_set.append(frag_name) | ||
1339 | # copy fragment into destdir | ||
1340 | shutil.copy2(srcpath, destdir) | ||
1341 | # copy fragment into local files if exists | ||
1342 | if os.path.isdir(local_files_dir): | ||
1343 | shutil.copy2(srcpath, local_files_dir) | ||
1344 | |||
1331 | if new_set is not None: | 1345 | if new_set is not None: |
1332 | for fname in new_set: | 1346 | for fname in new_set: |
1333 | if fname in existing_files: | 1347 | if fname in existing_files: |