Skip to contentSkip to conversation

classes/archiver: Create patched archive before configuring

PATCH In review Joshua Watt 1 participant 2 messages Jun 16, 2020 – Jun 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes/archiver: Create patched archive before configuring

do_configure and do_preconfigure can modify source files, which causes race conditions if these tasks run in parallel with do_ar_patched. Add explicit task dependencies to ensure that do_ar_patched finishes before these tasks start. Specifically, this fixes a race condition with gcc-source where do_ar_patched races with do_preconfigure deleting gcc/gengtype-lex.c

---
 meta/classes/archiver.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/archiver.bbclass +1 -1
index c2c049c343..e221fff695 100644
@@ -583,7 +583,7 @@ addtask do_deploy_archives_setscene
 
 addtask do_ar_original after do_unpack
 addtask do_unpack_and_patch after do_patch
-addtask do_ar_patched after do_unpack_and_patch
+addtask do_ar_patched after do_unpack_and_patch before do_preconfigure do_configure
 addtask do_ar_configured after do_unpack_and_patch
 addtask do_ar_mirror after do_fetch
 addtask do_dumpdata
Signature · 1 line
2.27.0
#1 lore raw

Steve,

I believe this patch should be backported to dunfell.

Thanks

Quoted 25 lines · Joshua Watt

do_configure and do_preconfigure can modify source files, which causes race conditions if these tasks run in parallel with do_ar_patched. Add explicit task dependencies to ensure that do_ar_patched finishes before these tasks start. Specifically, this fixes a race condition with gcc-source where do_ar_patched races with do_preconfigure deleting gcc/gengtype-lex.c

---
  meta/classes/archiver.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/archiver.bbclass +1 -1
index c2c049c343..e221fff695 100644
@@ -583,7 +583,7 @@ addtask do_deploy_archives_setscene
 
  addtask do_ar_original after do_unpack
  addtask do_unpack_and_patch after do_patch
-addtask do_ar_patched after do_unpack_and_patch
+addtask do_ar_patched after do_unpack_and_patch before do_preconfigure do_configure
  addtask do_ar_configured after do_unpack_and_patch
  addtask do_ar_mirror after do_fetch
  addtask do_dumpdata