From: Daniel Martí Date: Tue, 28 Jan 2014 22:49:36 +0000 (+0100) Subject: Do submodules recursively, do init and update at the same time X-Git-Tag: 0.2~341^2~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c06fafdb6f32e87b49dbc69a20fc723e821ed268;p=fdroidserver.git Do submodules recursively, do init and update at the same time --- diff --git a/docs/fdroid.texi b/docs/fdroid.texi index cb5d17a2..765dd5e8 100644 --- a/docs/fdroid.texi +++ b/docs/fdroid.texi @@ -820,8 +820,10 @@ Specifies to build from a subdirectory of the checked out source code. Normally this directory is changed to before building, @item submodules=yes -Use if the project (git only) has submodules - causes git submodule -init and update to be executed after the source is cloned. +Use if the project (git only) has submodules - causes @code{git submodule +update --init --recursive} to be executed after the source is cloned. +Submodules are reset and cleaned like the main app repository itself before +each build. @item init=xxxx As for 'prebuild', but runs on the source code BEFORE any other processing diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 3bca96d3..6ccb30d0 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -336,10 +336,8 @@ class vcs_git(vcs): def initsubmodules(self): self.checkrepo() - if subprocess.call(['git', 'submodule', 'init'], - cwd=self.local) != 0: - raise VCSException("Git submodule init failed") - if subprocess.call(['git', 'submodule', 'update'], + if subprocess.call(['git', 'submodule', 'update', + '--init', '--recursive'], cwd=self.local) != 0: raise VCSException("Git submodule update failed") if subprocess.call(['git', 'submodule', 'foreach',