path.py: Deal with race issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 3 May 2013 14:11:33 +0000 (15:11 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 3 May 2013 15:19:19 +0000 (16:19 +0100)
commit31270b11d32d620705ebfb3f5239ff6784c347d7
treed761cb025c20312bee9d2e2c85eac22872494e28
parentf2e9ab2abfaa353544468f328fecda6047db1178
path.py: Deal with race issue

The change to use copyhardlinktree in some of the sstate code instead of
copytree exposed a race condition. This is due to cp failing if it finds
a directory doesn't exist yet some other process creates it while cp was
trying to create it itself. tar doesn't error in this case.

To fix this we need to create the directory structure with tar, then
use cp to hardlink the files. Messy but probably worth doing.

I also took the opportunity to remove src_bak since the code is neater
without it.

(From OE-Core rev: 2f954a9a6932f1e6c564e7e7aacaac628a75eed7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/path.py