summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2020-04-30 19:49:55 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-22 16:23:24 +0100
commitad17c360654dddd23f0d289ab17485d234d728a8 (patch)
treecb5a5f1f8c782280bc3546b1e3eaef3cb4bb37a7 /meta
parent5f904d42b3a0bb5a26f4cfcbe852755e11f77e1d (diff)
downloadpoky-ad17c360654dddd23f0d289ab17485d234d728a8.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. (From OE-Core rev: f528d6ffc9649536d21d625f65b415bfec7db258) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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):
690 if not os.path.exists(siginfo): 690 if not os.path.exists(siginfo):
691 bb.siggen.dump_this_task(siginfo, d) 691 bb.siggen.dump_this_task(siginfo, d)
692 else: 692 else:
693 os.utime(siginfo, None) 693 try:
694 os.utime(siginfo, None)
695 except PermissionError:
696 pass
694 697
695 return 698 return
696 699
@@ -776,7 +779,7 @@ sstate_task_postfunc[dirs] = "${WORKDIR}"
776sstate_create_package () { 779sstate_create_package () {
777 # Exit early if it already exists 780 # Exit early if it already exists
778 if [ -e ${SSTATE_PKG} ]; then 781 if [ -e ${SSTATE_PKG} ]; then
779 touch ${SSTATE_PKG} 782 [ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG}
780 return 783 return
781 fi 784 fi
782 785
@@ -810,7 +813,7 @@ sstate_create_package () {
810 else 813 else
811 rm $TFILE 814 rm $TFILE
812 fi 815 fi
813 touch ${SSTATE_PKG} 816 [ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG}
814} 817}
815 818
816python sstate_sign_package () { 819python sstate_sign_package () {
@@ -1122,7 +1125,11 @@ python sstate_eventhandler() {
1122 if not os.path.exists(siginfo): 1125 if not os.path.exists(siginfo):
1123 bb.siggen.dump_this_task(siginfo, d) 1126 bb.siggen.dump_this_task(siginfo, d)
1124 else: 1127 else:
1125 os.utime(siginfo, None) 1128 try:
1129 os.utime(siginfo, None)
1130 except PermissionError:
1131 pass
1132
1126} 1133}
1127 1134
1128SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1" 1135SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"