aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-28 10:28:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-28 11:20:40 +0000
commitf8126aaf774186a6eaf0bd4067b89c074594886c (patch)
treeafebcd414515a6bc7c43f5092716f60bfe1b2e2c
parent5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d (diff)
downloadbitbake-f8126aaf774186a6eaf0bd4067b89c074594886c.zip
bitbake-f8126aaf774186a6eaf0bd4067b89c074594886c.tar.gz
bitbake-f8126aaf774186a6eaf0bd4067b89c074594886c.tar.bz2
fetch/git: Add pack-refs command to mirror handling code
We've noticed issues on our infrastucture iterating over the many tag/branch/head reference files that some git repositories may contain. By issuing the pack-refs command, we move these all to a single file which speeds up operations with the mirror repos in the downloads directory in general. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/git.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 5ef8cd6..d34ea1d 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -363,6 +363,7 @@ class Git(FetchMethod):
progresshandler = GitProgressHandler(d)
runfetchcmd(fetch_cmd, d, log=progresshandler, workdir=ud.clonedir)
runfetchcmd("%s prune-packed" % ud.basecmd, d, workdir=ud.clonedir)
+ runfetchcmd("%s pack-refs --all" % ud.basecmd, d, workdir=ud.clonedir)
runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d, workdir=ud.clonedir)
try:
os.unlink(ud.fullmirror)