From: Chen Qi Date: Wed, 3 Feb 2016 07:32:55 +0000 (+0800) Subject: copy_buildsystem: add ability to exclude layers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8ffa30199c723eb1fcbb4126c2ac5441e9da1bc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git copy_buildsystem: add ability to exclude layers In some cases, we may have some kind of download layers in BBLAYERS, so that we can set BB_NO_NETWORK to "1". This results in extremely large extensible SDK. And we actually don't need these download layers in the SDK. Add a new variable, SDK_LAYERS_EXCLUDE, to enable users to explicitly exclude some layers when generating the extensible SDK. [YOCTO #8878] Signed-off-by: Chen Qi --- diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index fb51b5183d4..abee5d9a779 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py @@ -18,6 +18,7 @@ class BuildSystem(object): self.d = d self.context = context self.layerdirs = d.getVar('BBLAYERS', True).split() + self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split() def copy_bitbake_and_layers(self, destdir): # Copy in all metadata layers + bitbake (as repositories) @@ -28,6 +29,11 @@ class BuildSystem(object): corebase = self.d.getVar('COREBASE', True) layers.append(corebase) + # Exclude layers + for layer_exclude in self.layers_exclude: + if layer_exclude in layers: + layers.remove(layer_exclude) + corebase_files = self.d.getVar('COREBASE_FILES', True).split() corebase_files = [corebase + '/' +x for x in corebase_files] # Make sure bitbake goes in