]> code.ossystems Code Review - openembedded-core.git/commit
scripts/gen-lockedsig-cache: fix race with temp file creation
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 16 Oct 2015 10:34:39 +0000 (11:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Oct 2015 16:54:36 +0000 (17:54 +0100)
commit588de5198c641ea1cfc3e01a6d129296bd2f706b
tree5b5896c3875fef0fd6458fad4b6b282a3d318dd6
parent33c3a74b0266c53773d7ca3983f9ff50c00b9000
scripts/gen-lockedsig-cache: fix race with temp file creation

As part of populating the sstate-cache with an artifact (.tgz file) we
create a temp file and then atomically move it to the final name. Due to
the glob used in this script such temp files were being matched, and
between the time they were matched and the time the script started
copying files, the temp file may have vanished.

This fixes random "No such file or directory" failures building the
extensible SDK on build setups where the sstate-cache directory is shared
amongst multiple build machines.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/gen-lockedsig-cache