diff options
Diffstat (limited to 'bitbake/bin/bitbake-setup')
| -rwxr-xr-x | bitbake/bin/bitbake-setup | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 36a1bbd91a..de83d780bf 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
| @@ -114,10 +114,23 @@ def checkout_layers(layers, layerdir, d): | |||
| 114 | os.remove(symlink) | 114 | os.remove(symlink) |
| 115 | os.symlink(os.path.relpath(t,layerdir),symlink) | 115 | os.symlink(os.path.relpath(t,layerdir),symlink) |
| 116 | 116 | ||
| 117 | def setup_bitbake_build(bitbake_config, layerdir, builddir): | 117 | def setup_bitbake_build(bitbake_config, layerdir, builddir, thisdir): |
| 118 | def _setup_build_conf(layers, build_conf_dir): | 118 | def _setup_build_conf(layers, build_conf_dir): |
| 119 | os.makedirs(build_conf_dir) | 119 | os.makedirs(build_conf_dir) |
| 120 | layers_s = "\n".join([" {} \\".format(os.path.join(layerdir,l)) for l in layers]) | 120 | layers_s = [] |
| 121 | for l in layers: | ||
| 122 | if l.startswith("{THISDIR}/"): | ||
| 123 | if thisdir: | ||
| 124 | l = l.format(THISDIR=thisdir) | ||
| 125 | else: | ||
| 126 | raise Exception("Configuration is using {THISDIR} to specify " \ | ||
| 127 | "a layer path relative to itself. This can be done only " \ | ||
| 128 | "when the configuration is specified by its path on local " \ | ||
| 129 | "disk, not when it's in a registry or is fetched over http.") | ||
| 130 | if not os.path.isabs(l): | ||
| 131 | l = os.path.join(layerdir, l) | ||
| 132 | layers_s.append(" {} \\".format(l)) | ||
| 133 | layers_s = "\n".join(layers_s) | ||
| 121 | bblayers_conf = """BBLAYERS ?= " \\ | 134 | bblayers_conf = """BBLAYERS ?= " \\ |
| 122 | {} | 135 | {} |
| 123 | " | 136 | " |
| @@ -237,7 +250,8 @@ def update_build(config, confdir, builddir, layerdir, d): | |||
| 237 | layer_config[k]["git-remote"] = v["git-remote"] | 250 | layer_config[k]["git-remote"] = v["git-remote"] |
| 238 | checkout_layers(layer_config, layerdir, d) | 251 | checkout_layers(layer_config, layerdir, d) |
| 239 | bitbake_config = config["bitbake-config"] | 252 | bitbake_config = config["bitbake-config"] |
| 240 | setup_bitbake_build(bitbake_config, layerdir, builddir) | 253 | thisdir = os.path.dirname(config["path"]) if config["type"] == 'local' else None |
| 254 | setup_bitbake_build(bitbake_config, layerdir, builddir, thisdir) | ||
| 241 | 255 | ||
| 242 | def int_input(allowed_values): | 256 | def int_input(allowed_values): |
| 243 | n = None | 257 | n = None |
