From 87f68108e603a3792b6c8f8296c1a188832952e4 Mon Sep 17 00:00:00 2001 From: Alexander van der Grinten Date: Sun, 31 Mar 2024 10:09:34 +0200 Subject: [PATCH] base: Support submodules --- xbstrap/base.py | 3 +++ xbstrap/schema.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/xbstrap/base.py b/xbstrap/base.py index 67c0ee4..893ee85 100644 --- a/xbstrap/base.py +++ b/xbstrap/base.py @@ -2168,6 +2168,9 @@ def checkout_src(cfg, src, settings): ) else: subprocess.check_call(["git", "rebase", commit], cwd=src.source_dir) + + if source.get("submodules", False): + subprocess.check_call(["git", "submodule", "update", "--init"], cwd=src.source_dir) elif "hg" in source: args = ["hg", "checkout"] if "tag" in source: diff --git a/xbstrap/schema.yml b/xbstrap/schema.yml index 4e2a073..fe756a2 100644 --- a/xbstrap/schema.yml +++ b/xbstrap/schema.yml @@ -97,6 +97,8 @@ definitions: type: string 'disable_shallow_fetch': type: boolean + 'submodules': + type: boolean 'regenerate': { $ref: '#/definitions/build_steps' } 'sources_required': { $ref: '#/definitions/source_deps' } 'tools_required': { $ref: '#/definitions/tool_deps' }