[oe-commits] [openembedded-core] 08/19: oe/copy_buildsystem: move layer into layers directory

git at git.openembedded.org git at git.openembedded.org
Thu Jul 18 11:17:48 UTC 2019


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

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

commit 55ecf6988d3e3c0935cb6324a6ad2c75f1191a1d
Author: Andrej Valek <andrej.valek at siemens.com>
AuthorDate: Wed Jul 17 15:25:44 2019 +0200

    oe/copy_buildsystem: move layer into layers directory
    
    Layers could be located outside from poky but inside the build directory.
    This case should be covered in eSDK.
    meta-abc
    meta-def/meta-ghi
    meta-def/poky
    meta-def/meta-oe/meta-oe
    ...
    
    It should take all enabled layers and put them into 'layers' dir during
    build-time with respecting new relative path to poky.
    layers/meta-abc
    layers/meta-ghi
    layers/poky
    layers/meta-oe/meta-oe
    ...
    
    Signed-off-by: Andrej Valek <andrej.valek at siemens.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/copy_buildsystem.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 5b96121..246ff58 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -45,6 +45,9 @@ class BuildSystem(object):
 
         corebase = os.path.abspath(self.d.getVar('COREBASE'))
         layers.append(corebase)
+        # Get relationship between TOPDIR and COREBASE
+        # Layers should respect it
+        corebase_relative = os.path.dirname(os.path.relpath(os.path.abspath(self.d.getVar('TOPDIR')), corebase))
         # The bitbake build system uses the meta-skeleton layer as a layout
         # for common recipies, e.g: the recipetool script to create kernel recipies
         # Add the meta-skeleton layer to be included as part of the eSDK installation
@@ -98,7 +101,10 @@ class BuildSystem(object):
             if corebase == os.path.dirname(layer):
                 layerdestpath += '/' + os.path.basename(corebase)
             else:
-                layer_relative = os.path.basename(corebase) + '/' + os.path.relpath(layer, corebase)
+                layer_relative = os.path.relpath(layer, corebase)
+                if os.path.dirname(layer_relative) == corebase_relative:
+                    layer_relative = os.path.dirname(corebase_relative) + '/' + layernewname
+                layer_relative = os.path.basename(corebase) + '/' + layer_relative
                 if os.path.dirname(layer_relative) != layernewname:
                     layerdestpath += '/' + os.path.dirname(layer_relative)
 

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


More information about the Openembedded-commits mailing list