summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-04-11 18:12:37 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-04-18 12:44:10 +0200
commit6490028cfb4b57eee115e9480f45be07c6ae2e02 (patch)
tree2f6e39d4a0c1d4e585a4fd311bf6e59480479f2e
parentf47851aebb7763da72df7e73a64660fd8084f86a (diff)
downloadjustbuild-6490028cfb4b57eee115e9480f45be07c6ae2e02.tar.gz
bootstrap-traverser: Support actions without inputs
-rwxr-xr-xbin/bootstrap-traverser.py2
-rwxr-xr-xbin/parallel-bootstrap-traverser.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/bootstrap-traverser.py b/bin/bootstrap-traverser.py
index 37c54f71..d2961312 100755
--- a/bin/bootstrap-traverser.py
+++ b/bin/bootstrap-traverser.py
@@ -79,7 +79,7 @@ def run_action(action_id, *, config, root, graph):
return action_dir
os.makedirs(action_dir)
action_desc = graph["actions"][action_id]
- for location, desc in action_desc["input"].items():
+ for location, desc in action_desc.get("input", {}).items():
link(build(desc, config=config, root=root, graph=graph),
os.path.join(action_dir, location))
cmd = action_desc["command"]
diff --git a/bin/parallel-bootstrap-traverser.py b/bin/parallel-bootstrap-traverser.py
index be9ef3d5..beaf75bd 100755
--- a/bin/parallel-bootstrap-traverser.py
+++ b/bin/parallel-bootstrap-traverser.py
@@ -245,7 +245,7 @@ def run_action(action_id, *, config, root, graph, ts, callback):
os.makedirs(action_dir)
action_desc = graph["actions"][action_id]
- num_deps = AtomicInt(len(action_desc["input"].items()))
+ num_deps = AtomicInt(len(action_desc.get("input", {}).items()))
def run_command_and_callbacks():
if num_deps.fetch_dec() <= 1:
cmd = action_desc["command"]
@@ -262,7 +262,7 @@ def run_action(action_id, *, config, root, graph, ts, callback):
if num_deps.value == 0:
run_command_and_callbacks()
- for location, desc in action_desc["input"].items():
+ for location, desc in action_desc.get("input", {}).items():
def create_link(location):
def do_link(path):
link(path, os.path.join(action_dir, location))