diff options
Diffstat (limited to 'bitbake/bin/bitbake-setup')
| -rwxr-xr-x | bitbake/bin/bitbake-setup | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 47de4654e3..29fdf11892 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
| @@ -129,21 +129,24 @@ def checkout_layers(layers, layerdir, d): | |||
| 129 | return layers_fixed_revisions | 129 | return layers_fixed_revisions |
| 130 | 130 | ||
| 131 | def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | 131 | def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): |
| 132 | def _setup_build_conf(layers, build_conf_dir): | 132 | def _setup_build_conf(layers, relative_layers, build_conf_dir): |
| 133 | os.makedirs(build_conf_dir) | 133 | os.makedirs(build_conf_dir) |
| 134 | layers_s = [] | 134 | layers_s = [] |
| 135 | |||
| 135 | for l in layers: | 136 | for l in layers: |
| 136 | if l.startswith("{THISDIR}/"): | 137 | l = os.path.join(layerdir, l) |
| 137 | if thisdir: | 138 | layers_s.append(" {} \\".format(l)) |
| 138 | l = l.format(THISDIR=thisdir) | 139 | |
| 139 | else: | 140 | for l in relative_layers: |
| 140 | raise Exception("Configuration is using {THISDIR} to specify " \ | 141 | if thisdir: |
| 141 | "a layer path relative to itself. This can be done only " \ | 142 | l = os.path.join(thisdir, l) |
| 142 | "when the configuration is specified by its path on local " \ | 143 | else: |
| 143 | "disk, not when it's in a registry or is fetched over http.") | 144 | raise Exception("Configuration is using bb-layers-relative to specify " \ |
| 144 | if not os.path.isabs(l): | 145 | "a layer path relative to itself. This can be done only " \ |
| 145 | l = os.path.join(layerdir, l) | 146 | "when the configuration is specified by its path on local " \ |
| 147 | "disk, not when it's in a registry or is fetched over http.") | ||
| 146 | layers_s.append(" {} \\".format(l)) | 148 | layers_s.append(" {} \\".format(l)) |
| 149 | |||
| 147 | layers_s = "\n".join(layers_s) | 150 | layers_s = "\n".join(layers_s) |
| 148 | bblayers_conf = """BBLAYERS ?= " \\ | 151 | bblayers_conf = """BBLAYERS ?= " \\ |
| 149 | {} | 152 | {} |
| @@ -220,7 +223,8 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir): | |||
| 220 | os.rename(bitbake_confdir, backup_bitbake_confdir) | 223 | os.rename(bitbake_confdir, backup_bitbake_confdir) |
| 221 | 224 | ||
| 222 | if layers: | 225 | if layers: |
| 223 | _setup_build_conf(layers, bitbake_confdir) | 226 | relative_layers = bitbake_config.get("bb-layers-relative") or [] |
| 227 | _setup_build_conf(layers, relative_layers, bitbake_confdir) | ||
| 224 | 228 | ||
| 225 | if template: | 229 | if template: |
| 226 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) | 230 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) |
