summaryrefslogtreecommitdiff
path: root/bin/just-import-git.py
diff options
context:
space:
mode:
authorKlaus T. Aehlig <aehlig@linta.de>2023-05-23 12:25:26 +0200
committerKlaus T. Aehlig <aehlig@linta.de>2023-05-23 12:25:26 +0200
commit0e768e18456a99dcb335e81e92bb52293425b91b (patch)
treef3726e5fbd5eafff858bdde74618bc633ad7bbe8 /bin/just-import-git.py
parent206ebecb67c18cac157007941a63cb31a767f30b (diff)
downloadjustbuild-0e768e18456a99dcb335e81e92bb52293425b91b.tar.gz
just-import-git: also recognize the workspace root as a layer
In the definition of a repository, the workspace root (given by the key "repository") can contain either a description of that root (where to fetch it, whast to expect) or simply a reference to (the workspace root of) another repository. In the latter case, the referenced repository has to be imported as a layer, just as if had been specified as target_root, rule_root, or expression_root.
Diffstat (limited to 'bin/just-import-git.py')
-rwxr-xr-xbin/just-import-git.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/just-import-git.py b/bin/just-import-git.py
index 36b3d32b..19b21539 100755
--- a/bin/just-import-git.py
+++ b/bin/just-import-git.py
@@ -163,6 +163,8 @@ def extra_layers_to_import(repos_config, repos):
as layers for the repositories to import."""
extra_imports = set()
for repo in repos:
+ if isinstance(repos_config[repo]["repository"], str):
+ extra_imports.add(repos_config[repo]["repository"])
for layer in ["target_root", "rule_root", "expression_root"]:
if layer in repos_config[repo]:
extra = repos_config[repo][layer]