summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2020-04-30 19:49:55 +0200
committerSteve Sakoman <steve@sakoman.com>2020-05-11 06:14:42 -1000
commitf528d6ffc9649536d21d625f65b415bfec7db258 (patch)
tree48fcc0a4f961e3e15a4bc3284133c1b9047ebb9e /meta/classes/sstate.bbclass
parent174c27e4edea0af92f60779cf3f63d21f6bce6fe (diff)
downloadopenembedded-core-f528d6ffc9649536d21d625f65b415bfec7db258.tar.gz
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. 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>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass15
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index c73c3b42a7..aa9c30b4e1 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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"