diff options
Diffstat (limited to 'external/poky/meta/lib/oe/copy_buildsystem.py')
-rw-r--r-- | external/poky/meta/lib/oe/copy_buildsystem.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/external/poky/meta/lib/oe/copy_buildsystem.py b/external/poky/meta/lib/oe/copy_buildsystem.py index 7cb784cf..31a84f5b 100644 --- a/external/poky/meta/lib/oe/copy_buildsystem.py +++ b/external/poky/meta/lib/oe/copy_buildsystem.py @@ -1,3 +1,6 @@ +# +# SPDX-License-Identifier: GPL-2.0-only +# # This class should provide easy access to the different aspects of the # buildsystem such as layers, bitbake location, etc. # @@ -42,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 @@ -95,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) @@ -165,10 +174,10 @@ class BuildSystem(object): def generate_locked_sigs(sigfile, d): bb.utils.mkdirhier(os.path.dirname(sigfile)) depd = d.getVar('BB_TASKDEPDATA', False) - tasks = ['%s.%s' % (v[2], v[1]) for v in depd.values()] + tasks = ['%s:%s' % (v[2], v[1]) for v in depd.values()] bb.parse.siggen.dump_lockedsigs(sigfile, tasks) -def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output): +def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, pruned_output): with open(lockedsigs, 'r') as infile: bb.utils.mkdirhier(os.path.dirname(pruned_output)) with open(pruned_output, 'w') as f: @@ -178,7 +187,11 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output if line.endswith('\\\n'): splitval = line.strip().split(':') if not splitval[1] in excluded_tasks and not splitval[0] in excluded_targets: - f.write(line) + if onlynative: + if 'nativesdk' in splitval[0]: + f.write(line) + else: + f.write(line) else: f.write(line) invalue = False |