Skip to content
Commit f3cd092b authored by Peter Kjellerstedt's avatar Peter Kjellerstedt Committed by Steve Sakoman
Browse files

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: default avatarPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: default avatarSteve Sakoman <steve@sakoman.com>
parent 4aa6f775
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