From 5e1728a9ad4f4e846ee0c9bc2c1fe1d439d794c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Thu, 16 Jul 2026 18:13:20 +0200 Subject: [PATCH] submodules: Fetch nested frida-bindgen --- tools/ensure-submodules.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/ensure-submodules.py b/tools/ensure-submodules.py index c3049043..b1205809 100755 --- a/tools/ensure-submodules.py +++ b/tools/ensure-submodules.py @@ -22,9 +22,19 @@ def main(argv: list[str]): run(["git", "submodule", "update", *UPDATE_FLAGS], cwd=releng) for relpath in paths_to_check: - if not (SOURCE_ROOT / relpath / "meson.build").exists(): + subproject = SOURCE_ROOT / relpath + if not (subproject / "meson.build").exists(): print(f"Fetching {relpath.name}...", flush=True) run(["git", "submodule", "update", *UPDATE_FLAGS, relpath], cwd=SOURCE_ROOT) + + # frida-python/-node/-swift vendor the shared frida-bindgen generator + # as a nested submodule that their meson build needs. + gitmodules = subproject / ".gitmodules" + bindgen = subproject / "frida-bindgen" + if gitmodules.exists() and "frida-bindgen" in gitmodules.read_text() \ + and not (bindgen / "frida_bindgen_core" / "__init__.py").exists(): + print(f"Fetching {relpath.name}'s frida-bindgen...", flush=True) + run(["git", "submodule", "update", *UPDATE_FLAGS, "frida-bindgen"], cwd=subproject) except Exception as e: print(e, file=sys.stderr) if isinstance(e, subprocess.CalledProcessError):