]> 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)
committerSteve Sakoman <steve@sakoman.com>
Mon, 27 Jul 2020 22:15:56 +0000 (12:15 -1000)
commitaf8f5fe82f27702ad727b27daefd5e97d9e64efa
treef3046abf7d2a8e89ccadfb5117c7d7256b5edce9
parentd22af1a7d68b59da8967179af0893003e7d8a8a1
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>
(cherry picked from commit 214d236d93700abffa2d586cc744a00455818fa4)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/buildhistory.bbclass