]> 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 22:07:32 +0000 (23:07 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 7 Feb 2022 14:40:13 +0000 (04:40 -1000)
commitf3cd092bf9f66d8d73075e5b777d89d8598691dd
tree3ecbaaf1184d106dd4c2ab04800386487b184ae4
parent4aa6f775cd6c20c7296a2aab25ff462d581499d0
sstate: A third fix for for touching files inside pseudo

This continues where commit 676757f "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.

Change-Id: I3800f98d0f2a0dd076352df85fad7c81460e733d
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/sstate.bbclass