build_package.sh: SPM: Smart retrying when fetching SPM submodules
It turned out that just retrying "git submodule update" command is not
reliable in the presence of some errors. A particlar submodule may get
stuck in a weird state when "git submodule" thinks it's ok, but it's
actually not checked out properly. So, in case an errors happens,
explicitly deinit module and re-init and update again, and do all
operations per-module to be efficient.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I441e2066aefa7e93db5c5e2903775aae16b29fc6
(cherry picked from commit ad274423215ba0a5ac0ad28fb139145247107ead)
1 file changed