summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2019-07-17 15:25:44 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-18 12:16:19 +0100
commitc41acbcf8a7f1e5e912408f5490e598dcd0e2b22 (patch)
treed8170a446030e995dd874719f88745db08d1e8f4
parent9f6dcdaf96ecad8de945859fac6487664e4526c1 (diff)
downloadpoky-c41acbcf8a7f1e5e912408f5490e598dcd0e2b22.tar.gz
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 ... (From OE-Core rev: 55ecf6988d3e3c0935cb6324a6ad2c75f1191a1d) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/copy_buildsystem.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 5b96121ddb..246ff58250 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -45,6 +45,9 @@ class BuildSystem(object):
45 45
46 corebase = os.path.abspath(self.d.getVar('COREBASE')) 46 corebase = os.path.abspath(self.d.getVar('COREBASE'))
47 layers.append(corebase) 47 layers.append(corebase)
48 # Get relationship between TOPDIR and COREBASE
49 # Layers should respect it
50 corebase_relative = os.path.dirname(os.path.relpath(os.path.abspath(self.d.getVar('TOPDIR')), corebase))
48 # The bitbake build system uses the meta-skeleton layer as a layout 51 # The bitbake build system uses the meta-skeleton layer as a layout
49 # for common recipies, e.g: the recipetool script to create kernel recipies 52 # for common recipies, e.g: the recipetool script to create kernel recipies
50 # Add the meta-skeleton layer to be included as part of the eSDK installation 53 # Add the meta-skeleton layer to be included as part of the eSDK installation
@@ -98,7 +101,10 @@ class BuildSystem(object):
98 if corebase == os.path.dirname(layer): 101 if corebase == os.path.dirname(layer):
99 layerdestpath += '/' + os.path.basename(corebase) 102 layerdestpath += '/' + os.path.basename(corebase)
100 else: 103 else:
101 layer_relative = os.path.basename(corebase) + '/' + os.path.relpath(layer, corebase) 104 layer_relative = os.path.relpath(layer, corebase)
105 if os.path.dirname(layer_relative) == corebase_relative:
106 layer_relative = os.path.dirname(corebase_relative) + '/' + layernewname
107 layer_relative = os.path.basename(corebase) + '/' + layer_relative
102 if os.path.dirname(layer_relative) != layernewname: 108 if os.path.dirname(layer_relative) != layernewname:
103 layerdestpath += '/' + os.path.dirname(layer_relative) 109 layerdestpath += '/' + os.path.dirname(layer_relative)
104 110