[oe-commits] [openembedded-core] 03/54: devtool: standard: Handle exporting generated config fragments

git at git.openembedded.org git at git.openembedded.org
Thu Apr 4 22:15:12 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 1a0d0dde211c97cf7d076bc10db77db0247418dd
Author: Nathan Rossi <nathan at nathanrossi.com>
AuthorDate: Wed Apr 3 05:37:02 2019 +0000

    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.
    
    Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/devtool/standard.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index ea09bbf..0a1e329 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):
                 if os.path.exists(os.path.join(local_files_dir, fragment_fn)):
                     os.unlink(os.path.join(local_files_dir, fragment_fn))
 
+    # Special handling for cml1, ccmake, etc bbclasses that generated
+    # configuration fragment files that are consumed as source files
+    for frag_class, frag_name in [("cml1", "fragment.cfg"), ("ccmake", "site-file.cmake")]:
+        if bb.data.inherits_class(frag_class, rd):
+            srcpath = os.path.join(rd.getVar('WORKDIR'), frag_name)
+            if os.path.exists(srcpath):
+                if frag_name not in new_set:
+                    new_set.append(frag_name)
+                # copy fragment into destdir
+                shutil.copy2(srcpath, destdir)
+                # copy fragment into local files if exists
+                if os.path.isdir(local_files_dir):
+                    shutil.copy2(srcpath, local_files_dir)
+
     if new_set is not None:
         for fname in new_set:
             if fname in existing_files:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list