]> code.ossystems Code Review - openembedded-core.git/commit
sstate: A third fix for for touching files inside pseudo
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Sat, 29 Jan 2022 21:44:53 +0000 (22:44 +0100)
committerAnuj Mittal <anuj.mittal@intel.com>
Fri, 4 Feb 2022 03:03:28 +0000 (11:03 +0800)
commitb2a5d9bc61e0b2b7e0f187a262a514952ed30563
tree1839f108b3c35c9dcea87737f1020fe54cc71f4e
parentcc9d4a69e6c6aa99ff58232b37a607ee3ac48a67
sstate: A third fix for for touching files inside pseudo

This continues where commit676757f "sstate: fix touching files inside
pseudo" and commit 29fc8599 "sstate: another fix for touching files
inside pseudo" left off.

The previous changes switched from trying to check if the sstate file is
writable before touching it, to always touching the sstate file and
ignoring any errors. However, if the sstate file is actually a symbolic
link that links to nothing, this would actually result in an empty
sstate file being created. And this in turn leads to that future
setscene tasks will fail when they try to unpack the empty file.

Change the code so that if an sstate file linking to nothing already
exists, it is overwritten with the new sstate file. Also change it so
that the temporary file that is used is always removed, even if ln
fails to link the sstate file to it.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/classes/sstate.bbclass