Skip to content
Commit 552197a0 authored by Peter Kjellerstedt's avatar Peter Kjellerstedt Committed by Richard Purdie
Browse files

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: default avatarPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent c134f620
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment