aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass12
-rw-r--r--meta/lib/oe/copy_buildsystem.py8
2 files changed, 8 insertions, 12 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index e1bba49eaf..f0c8709c5b 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -200,15 +200,9 @@ python copy_buildsystem () {
workspace_name = 'orig-workspace'
else:
workspace_name = None
- layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name)
-
- sdkbblayers = []
- corebase = os.path.basename(d.getVar('COREBASE'))
- for layer in layers_copied:
- if corebase == os.path.basename(layer):
- conf_bbpath = os.path.join('layers', layer, 'bitbake')
- else:
- sdkbblayers.append(layer)
+
+ corebase, sdkbblayers = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name)
+ conf_bbpath = os.path.join('layers', corebase, 'bitbake')
for path in os.listdir(baseoutpath + '/layers'):
relpath = os.path.join('layers', path, oe_init_env_script)
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))