1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

sstate.bbclass: Do not fail if files cannot be touched

It may be that a file is not allowed to be touched, e.g., if it is a
symbolic link into a global sstate cache served over NFS.

(From OE-Core rev: 462e3f505217c9b9e0d2c1cbdafb0c8910bb6a59)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt
2020-04-30 19:49:55 +02:00
committed by Richard Purdie
parent 634735c81a
commit 1f1650e5d8
+11 -4
View File
@@ -690,7 +690,10 @@ def sstate_package(ss, d):
if not os.path.exists(siginfo):
bb.siggen.dump_this_task(siginfo, d)
else:
os.utime(siginfo, None)
try:
os.utime(siginfo, None)
except PermissionError:
pass
return
@@ -776,7 +779,7 @@ sstate_task_postfunc[dirs] = "${WORKDIR}"
sstate_create_package () {
# Exit early if it already exists
if [ -e ${SSTATE_PKG} ]; then
touch ${SSTATE_PKG}
[ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG}
return
fi
@@ -810,7 +813,7 @@ sstate_create_package () {
else
rm $TFILE
fi
touch ${SSTATE_PKG}
[ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG}
}
python sstate_sign_package () {
@@ -1122,7 +1125,11 @@ python sstate_eventhandler() {
if not os.path.exists(siginfo):
bb.siggen.dump_this_task(siginfo, d)
else:
os.utime(siginfo, None)
try:
os.utime(siginfo, None)
except PermissionError:
pass
}
SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"