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
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-09 18:57:21 +0100
commit1f1650e5d879fde962fdfb5786784a8e9b21a3b1 (patch)
tree2d055b0e35bc28d12c94a3843cede6b7ba1205af /meta/classes/sstate.bbclass
parent634735c81ad8cf5ae96d05c61e590fb39e29546a (diff)
downloadpoky-1f1650e5d879fde962fdfb5786784a8e9b21a3b1.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: 462e3f505217c9b9e0d2c1cbdafb0c8910bb6a59) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
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"