summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2024-07-07 00:20:37 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-07-13 23:30:07 +0100
commite2527cf58f4f390712641a99b276b9e0aeae01c6 (patch)
tree042f0172ed1f34b3800d479dce8cfa00c0426407 /bitbake/lib/bb/tests/fetch.py
parentae4ec59b3eff85aaa1cfe914a134e56e1d125744 (diff)
downloadpoky-e2527cf58f4f390712641a99b276b9e0aeae01c6.tar.gz
bitbake: fetch2/git: Use git shallow fetch to implement clone_shallow_local()
This patch can make the following settings much more faster: BB_GIT_SHALLOW = "1" BB_GENERATE_MIRROR_TARBALLS = "1" * The previous implementation was: - Make a full clone for the repo from local ud.clonedir - Use git-make-shallow to remove unneeded revs It was very slow for recipes which have a lot of SRC_URIs, for example vulkan-samples and docker-compose, the docker-compose can't be done after 5 hours. $ bitbake vulkan-samples -cfetch Before: 12 minutes Now: 2 minutes $ bitbake docker-compose -cfetch Before: More than 300 minutes Now: 15 minutes * The patch uses git shallow fetch to fetch the repo from local ud.clonedir: - For BB_GIT_SHALLOW_DEPTH: git fetch --depth <depth> rev - For BB_GIT_SHALLOW_REVS: git fetch --shallow-exclude=<revs> rev Then the git repo will be shallow, and git-make-shallow is not needed any more. And git shallow fetch will download less commits than before since it doesn't need "rev^" to parse the dependencies, the previous code always need 'rev^'. (Bitbake rev: a5a569c075224fe41707cfa9123c442d1fda2fbf) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
0 files changed, 0 insertions, 0 deletions