]> code.ossystems Code Review - openembedded-core.git/commit
buildhistory: use pid for temporary txt file name
authorLee Chee Yang <chee.yang.lee@intel.com>
Thu, 23 Jul 2020 01:16:13 +0000 (09:16 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Jul 2020 14:11:00 +0000 (15:11 +0100)
commit214d236d93700abffa2d586cc744a00455818fa4
treed020a671200bf1771ca1b12ef22ca40099d37610
parent5d8c4ea26a48135c3405afac0372e4e062a7339a
buildhistory: use pid for temporary txt file name

buildhistory create .txt file bh_installed_pkgs.txt and
bh_installed_pkgs_deps.txt while listing down installed package.
These file is later removed in buildhistory_get_installed().

when multiple process runs in parellal there are chances to race for
the file where one process created the file while another task remove
the file right after it.

using different file name for each process should avoid the race. So
add PID to the file name to make it unique.

[yocto #13709]

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass