poky/scripts/lib/devtool
Taras Kondratiuk 711064cad9 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: eae5caaf050f54a065e2654a60f55fda2c3afd95)

Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-22 00:31:48 +01:00
..
__init__.py devtool: prevent starting git gc in background 2019-05-22 00:31:48 +01:00
build_image.py scripts: remove True option to getVar calls 2016-12-16 10:23:23 +00:00
build_sdk.py devtool: add build-sdk subcommand 2016-03-07 00:11:38 +00:00
build.py build.py: add clean option to 'devtool build' command 2018-09-10 12:13:06 +01:00
deploy.py devtool: fix target-deploy --strip 2019-01-08 20:14:42 +00:00
export.py logging: use warning instead warn 2018-07-26 13:16:40 +01:00
import.py logging: use warning instead warn 2018-07-26 13:16:40 +01:00
package.py meta/scripts: Various getVar/getVarFlag expansion parameter fixes 2017-01-09 13:39:11 +00:00
runqemu.py devtool: point runqemu to correct native bindir 2017-04-05 23:22:12 +01:00
sdk.py devtool/sdk.py: error out in case of downloading file failure 2018-05-15 10:56:48 +01:00
search.py devtool: search: tweak help text 2018-03-01 22:13:56 +00:00
standard.py correct do_patch for kernel bbappend in sdk 2019-05-22 00:31:48 +01:00
upgrade.py logging: use warning instead warn 2018-07-26 13:16:40 +01:00
utilcmds.py devtool: make find-recipe and edit-recipe always work with any recipe 2017-11-11 12:14:27 +00:00