poky/scripts/lib
Taras Kondratiuk 21ba8861bd devtool: prevent starting git gc in background
Devtool creates a git repository for extracted sources in a temporary
directory and then moves it to a final destination after patching is
done. Unfortunately devtool is not aware that some of its git operations
may have caused git garbage collector to start in background. If timing
is just right a repository move fails because GC is removing git objects
while they are being moved.

The issue was hit on Krogoth release, but the code that moves created
git repository is still the same.

Disable gc.autodetach to make GC run synchronously and block git until
it is done.

Traceback (most recent call last):
  File "<snip>/openembedded-core/scripts/devtool", line 342, in <module>
    ret = main()
  File "<snip>/openembedded-core/scripts/devtool", line 329, in main
    ret = args.func(args, config, basepath, workspace)
  File "<snip>/openembedded-core/scripts/lib/devtool/standard.py", line 352, in extract
    initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, rd)
  File "<snip>/openembedded-core/scripts/lib/devtool/standard.py", line 644, in _extract_source
    shutil.move(srcsubdir, srctree)
  File "/usr/lib/python2.7/shutil.py", line 299, in move
    copytree(src, real_dst, symlinks=True)
  File "/usr/lib/python2.7/shutil.py", line 208, in copytree
    raise Error, errors
Error: [('/tmp/devtool5RXkuX/workdir/grpc-1.2.5/.git/objects/5e', '<snip>/build/grpc/grpc_src/.git/objects/5e', "[Errno 2] No such file or directory: '/tmp/devtool5RXkuX/workdir/grpc-1.2.5/.git/objects/5e'"), ('/tmp/devtool5RXkuX/workdir/grpc-1.2.5/.git/objects/57', '<snip>/build/grpc/grpc_src/.git/objects/57', "[Errno 2] No such file or directory: '/tmp/devtool5RXkuX/workdir/grpc-1.2.5/.git/objects/57'"), many git objects ... ]

(From OE-Core rev: 3da578a79195a63fb6d4bbd68d8f1548defd205f)

Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-24 17:00:52 +00:00
..
build_perf oe-buildperf-report: highlight large changes in the HTML report 2018-05-11 07:49:38 +01:00
checklayer checklayer: Avoid adding the layer if it is already present 2019-02-14 11:20:55 +00:00
devtool devtool: prevent starting git gc in background 2019-03-24 17:00:52 +00:00
recipetool logging: use warning instead warn 2018-07-26 13:16:40 +01:00
resulttool resulttool/manualexecution: To output right test case id 2019-03-18 22:59:58 +00:00
wic wic: Ensure that sourceparams values can contain '=' 2019-02-28 17:47:10 +00:00
argparse_oe.py argparse_oe: Add int_positive type 2017-07-21 08:44:25 +01:00
buildstats.py lib/buildstats: Improve error message 2019-02-16 08:19:34 +00:00
scriptpath.py scripts: consolidate code to find bitbake path 2014-06-25 13:51:45 +01:00
scriptutils.py oe.scriptutils: enable color in a more flexible way 2019-03-06 10:39:25 +00:00