summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorAdam Romanek <romanek.adam@gmail.com>2021-07-07 12:40:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-10 22:43:41 +0100
commit6cd8032e359932d46b3dd8351b7a77f0270a0c7d (patch)
treeec6c76554fe9d23095739d080e67bd1d3f2191bd /bitbake/lib/bb/fetch2/git.py
parent7c1d50772dd362a25e42e8492793b0ea27e254c6 (diff)
downloadpoky-6cd8032e359932d46b3dd8351b7a77f0270a0c7d.tar.gz
bitbake: fetch/git: run gc in foreground to avoid race with tar
It looks like git gc can interrupts the package creation when BB_GENERATE_MIRRORS_TARBALL is in use. Log excerpts: tar -czf TOPDIR/../downloads/git2_bitbucket.name-hidden.git.tar.gz . failed with exit code 1, output: tar: ./objects/pack/pack-89a1d76f6c08f53172ef1d02ff851d90564362c4.pack: file changed as we read it tar: ./objects/pack/pack-b4a48ada355d333630fdf6b4f67205b7c264dc2c.idx: File removed before we read it Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. (Bitbake rev: a8d8cb847063862d1a7998963dd8b767ff73d877) Signed-off-by: Adam Romanek <romanek.adam@gmail.com> Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 5e65c83c63..488f4c7414 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -231,7 +231,7 @@ class Git(FetchMethod):
231 for name in ud.names: 231 for name in ud.names:
232 ud.unresolvedrev[name] = 'HEAD' 232 ud.unresolvedrev[name] = 'HEAD'
233 233
234 ud.basecmd = d.getVar("FETCHCMD_git") or "git -c core.fsyncobjectfiles=0" 234 ud.basecmd = d.getVar("FETCHCMD_git") or "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false"
235 235
236 write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0" 236 write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0"
237 ud.write_tarballs = write_tarballs != "0" or ud.rebaseable 237 ud.write_tarballs = write_tarballs != "0" or ud.rebaseable