externalsrc: write task locks into ${T}, not into ${S}
PATCH 1/1 externalsrc: write task locks into ${T}, not into ${S}
Otherwise lock files appearing and disappearing can interfere with reproducibility code enumerating source files in do_unpack():
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/3745/steps/14/logs/stdio
--- meta/classes/externalsrc.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +1 -1
@@ -88,7 +88,7 @@ python () { bb.build.deltask(task, d) elif os.path.realpath(d.getVar('S')) == os.path.realpath(d.getVar('B')): # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time - d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") + d.appendVarFlag(task, "lockfiles", " ${T}/singletask.lock") for funcname in [task, "base_" + task, "kernel_" + task]: # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
Signature · 1 line
2.30.2
Quoted 15 lines · Alexander Kanavin
Otherwise lock files appearing and disappearing can interfere with reproducibility code enumerating source files in
do_unpack():https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/3745/steps/14/logs/stdio
Signed-off-by Alexander Kanavin <[email protected]>--- meta/classes/externalsrc.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/externalsrc.bbclass +0
-0
meta/classes/externalsrc.bbclass python () { · line 94
Quoted 8 lines
meta/classes/externalsrc.bbclass +1
-1@@ -88,7 +88,7 @@ python () { bb.build.deltask(task, d) elif os.path.realpath(d.getVar('S')) == os.path.realpath(d.getVar('B')): # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time - d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") + d.appendVarFlag(task, "lockfiles", " ${T}/singletask.lock") for funcname in [task, "base_" + task, "kernel_" + task]: # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
Not an option I'm afraid as it is in ${S} for a reason. This is two recipes both pointing at the same source (e.g. a recipe and it's BBCLASSEXTEND native version) can work.
Cheers,
Richard
Quoted 3 lines · Richard Purdie
Not an option I'm afraid as it is in ${S} for a reason. This is two recipes both pointing at the same source (e.g. a recipe and it's BBCLASSEXTEND native version) can work.
I considered adding an exclusion for the lock filename to the code that tracebacks, but special casing like that is pretty ugh. Today here, tomorrow elsewhere.
Alex
Quoted 10 lines · Alexander Kanavin
Quoted 3 lines · Richard Purdie
Not an option I'm afraid as it is in ${S} for a reason. This is two recipes both pointing at the same source (e.g. a recipe and it's BBCLASSEXTEND native version) can work.
I considered adding an exclusion for the lock filename to the code that tracebacks, but special casing like that is pretty ugh. Today here, tomorrow elsewhere.
Right, but the lock was also added there for a reason so we're going to have to work out some solution :/.
Cheers,
Richard
Quoted 6 lines · Richard Purdie
Quoted 3 lines
I considered adding an exclusion for the lock filename to the code that tracebacks, but special casing like that is pretty ugh. Today here, tomorrow elsewhere.
Right, but the lock was also added there for a reason so we're going to have to work out some solution :/.
One thing I don't quite understand is why the lock file is appearing and disappearing while the task itself is executing? Shouldn't it be happening when the task queue is being processed?
Alex
Quoted 6 lines · Alexander Kanavin
Quoted 4 lines · Richard Purdie
Quoted 3 lines
I considered adding an exclusion for the lock filename to the code that tracebacks, but special casing like that is pretty ugh. Today here, tomorrow elsewhere.
Quoted 6 lines
Quoted 2 lines
Right, but the lock was also added there for a reason so we're going to have to work out some solution :/.
One thing I don't quite understand is why the lock file is appearing and disappearing while the task itself is executing? Shouldn't it be happening when the task queue is being processed?
I think we do need to understand why that is happening. I don't remember the specifics of the lock but it is possible it is being held and then released by another task running in parallel?
Cheers,
Richard