From 7d3ad1405ca3f891db82091f31783a650a6bc681 Mon Sep 17 00:00:00 2001 From: Damien Riegel Date: Fri, 15 Jun 2018 20:18:38 -0400 Subject: populate_sdk_ext.bbclass: fix corebase identification When generating the extended SDK, there is a copy step where this class goes through the layers and other stuff that have been copied to generate the SDK. The corebase; ie. the folder that contains the core layer 'meta' is treated in a special way. Unfortunately in our tree, we have: sources/meta/meta | `- core layer `------- corebase In populate_sdk_ext's copy_buildsystem, the heuristic to determine which element of the list returned by copy_bitbake_and_layers is corebase is fooled by such layout. In copy_bitbake_and_layers, corebase is already handled specifically and reliably, so we should let that function tell us which folder is corebase instead of trying to determine it. To do so, change the return type of copy_bitbake_and_layers to a tuple that contains (corebase, copied_layers). It also simplifies the code on the caller side. (From OE-Core rev: 5368bc5d0d3606198b93e877bcafcd77bb5f4fd1) Signed-off-by: Damien Riegel Signed-off-by: Richard Purdie --- meta/lib/oe/copy_buildsystem.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'meta/lib/oe') diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index 4b94806c73..4abec4666f 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py @@ -26,6 +26,7 @@ class BuildSystem(object): def copy_bitbake_and_layers(self, destdir, workspace_name=None): # Copy in all metadata layers + bitbake (as repositories) + copied_corebase = None layers_copied = [] bb.utils.mkdirhier(destdir) layers = list(self.layerdirs) @@ -84,17 +85,18 @@ class BuildSystem(object): layer_relative = os.path.relpath(layerdestpath, destdir) - layers_copied.append(layer_relative) - # Treat corebase as special since it typically will contain # build directories or other custom items. if corebase == layer: + copied_corebase = layer_relative bb.utils.mkdirhier(layerdestpath) for f in corebase_files: f_basename = os.path.basename(f) destname = os.path.join(layerdestpath, f_basename) _smart_copy(f, destname) else: + layers_copied.append(layer_relative) + if os.path.exists(os.path.join(layerdestpath, 'conf/layer.conf')): bb.note("Skipping layer %s, already handled" % layer) else: @@ -140,7 +142,7 @@ class BuildSystem(object): layers_copied.remove(layer) break - return layers_copied + return copied_corebase, layers_copied def generate_locked_sigs(sigfile, d): bb.utils.mkdirhier(os.path.dirname(sigfile)) -- cgit v1.2.3-54-g00ecf