'git submodule update --init -recursive' will clone remote repositories if local tree does not have the referenced commits. Add --no-fetch to git submodule update if BB_NO_NETWORK is defined and only local download caches should be used.
Signed-off-by: Mikko Rapeli <[email protected]> --- bitbake/lib/bb/fetch2/gitsm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py index 20a9c40..007d06e 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/lib/bb/fetch2/gitsm.py @@ -140,4 +140,7 @@ class GitSM(Git): runfetchcmd("cp -a " + clone_modules + " " + dest_modules, d) runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=ud.destdir) - runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir) + if d.getVar("BB_NO_NETWORK", True) == "1": + runfetchcmd(ud.basecmd + " submodule update --no-fetch --init --recursive", d, workdir=ud.destdir) + else: + runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=ud.destdir) -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
