]> code.ossystems Code Review - openembedded-core.git/commit
devtool: set up git repos so that singletask.lock is ignored
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 31 Jan 2018 19:32:07 +0000 (08:32 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 6 Feb 2018 10:54:34 +0000 (10:54 +0000)
commit334ba846c795fc0d8c73ce05a1b0882739c86650
tree18136cf3f1e718bd3345cc4edbbc4aeeaa83b1fe
parent6b417c7c3a38463c64756beae9817fa2a80fd09e
devtool: set up git repos so that singletask.lock is ignored

singletask.lock is written out while certain tasks execute for recipes
that have externalsrc.bbclass enabled - this includes recipes in
devtool's workspace. It appears that there's a race where
singletask.lock will be there one minute and then when we try to get the
file checksum of it (since we want to know if anything in the source
tree has changed) it will be gone, and git chokes. To fix that, add
singletask.lock to .git/info/exclude in the repository, regardless of
whether we created the repository or not. In any case singletask.lock
should never be tracked by git, so this is a good thing to be doing for
that reason as well.

This fixes oe-selftest failures in test_devtool_modify that we've seen
on the Yocto Project autobuilder:

bb.data_smart.ExpansionError: Failure expanding variable
do_compile[file-checksums], expression was ${@srctree_hash_files(d)}
which triggered exception CalledProcessError: Command
'['git', 'add', '-A', '.']' returned non-zero exit status 128.

Note that this only fixes this issue for devtool; if you are using
externalsrc independently of devtool there's a chance this will still
be an issue unless you add singletask.lock to your .gitignore.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/__init__.py