summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-06 10:08:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-06 23:54:39 +0000
commit3b3ef106a29296fecf888e573787281a193c6b6f (patch)
tree75d5b9341a77cbec9310925ca93e08759408a91b /meta/classes
parent1a401e1c660bc16207d80e984bb05ba31ce2957c (diff)
downloadpoky-3b3ef106a29296fecf888e573787281a193c6b6f.tar.gz
sstate: Avoid races over rewritten siginfo files
Try and avoid errors like: Exception: bb.process.ExecutionError: Execution of 'build/tmp/work/x86_64-linux/libxslt-native/1.1.34-r0/temp/run.sstate_unpack_package.12343' failed with exit code 1: touch: setting times of 'build/sstate_devtool/80/4d/sstate:libxslt-native::1.1.34:r0::3:804d33f3f8d032b01ae92207669dd0a8f95a84917d563d122a77df19e786d73c_populate_lic.tgz.siginfo': Stale file handle WARNING: exit code 1 from a shell command. by not overwriting existing files. (From OE-Core rev: b2a389ad5111d587db3f95c6ce13fc2eafc22f27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass13
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 241dace6d9..356fe7ec18 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -686,7 +686,11 @@ def sstate_package(ss, d):
686 bb.build.exec_func(f, d, (sstatebuild,)) 686 bb.build.exec_func(f, d, (sstatebuild,))
687 687
688 # SSTATE_PKG may have been changed by sstate_report_unihash 688 # SSTATE_PKG may have been changed by sstate_report_unihash
689 bb.siggen.dump_this_task(d.getVar('SSTATE_PKG') + ".siginfo", d) 689 siginfo = d.getVar('SSTATE_PKG') + ".siginfo"
690 if not os.path.exists(siginfo):
691 bb.siggen.dump_this_task(siginfo, d)
692 else:
693 os.utime(siginfo, None)
690 694
691 return 695 return
692 696
@@ -1110,8 +1114,11 @@ python sstate_eventhandler() {
1110 d.setVar("SSTATE_PKGSPEC", "${SSTATE_SWSPEC}") 1114 d.setVar("SSTATE_PKGSPEC", "${SSTATE_SWSPEC}")
1111 d.setVar("SSTATE_EXTRAPATH", "") 1115 d.setVar("SSTATE_EXTRAPATH", "")
1112 d.setVar("SSTATE_CURRTASK", taskname) 1116 d.setVar("SSTATE_CURRTASK", taskname)
1113 sstatepkg = d.getVar('SSTATE_PKG') 1117 siginfo = d.getVar('SSTATE_PKG') + ".siginfo"
1114 bb.siggen.dump_this_task(sstatepkg + ".siginfo", d) 1118 if not os.path.exists(siginfo):
1119 bb.siggen.dump_this_task(siginfo, d)
1120 else:
1121 os.utime(siginfo, None)
1115} 1122}
1116 1123
1117SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1" 1124SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"