Skip to contentSkip to conversation

externalsrc: No single-task lock if S != B

PATCH In review Douglas 4 participants 6 messages Oct 9, 2020 – Oct 13, 2020

lore
Share & tools
lore

Douglas

author
#0 lore raw

PATCH 1/1 externalsrc: No single-task lock if S != B

Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree.

---
meta/classes/externalsrc.bbclass | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/classes/externalsrc.bbclass
index d200129987..73bbb2be3c 100644

meta/classes/externalsrc.bbclass +0 -0
@@ -85,7 +85,7 @@ python () {

if task.endswith("_setscene"):

# sstate is never going to work for external source trees, disable it
bb.build.deltask(task, d)
- else:
+ elif externalsrc == externalsrcbuild:
# 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")

--
2.17.1

Signature · 3 lines
This Communication is Confidential. We only send and receive email on the
basis of the terms set out at www.taitradio.com/email_disclaimer 
<http://www.taitradio.com/email_disclaimer>
#1 lore raw
Quoted 15 lines · Douglas via lists.openembedded.org

Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree.

---
meta/classes/externalsrc.bbclass | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +0 -0
index d200129987..73bbb2be3c 100644
@@ -85,7 +85,7 @@ python () {

if task.endswith("_setscene"):

Quoted 4 lines
# sstate is never going to work for external source trees, disable it
bb.build.deltask(task, d)
- else:
+ elif externalsrc == externalsrcbuild:

If any of the paths contain a symlink they can point to the same dir without being textually equal. You need to normalize them first.

/Ola

author
#2 lore raw
In reply to Douglas

Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree.

---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +0 -0
index 3618b99a86..88408add71 100644
@@ -86,7 +86,7 @@ python () {
             if task.endswith("_setscene"):
                 # sstate is never going to work for external source

trees, disable it
bb.build.deltask(task, d)
- else:
+ elif os.path.realpath(externalsrc) ==
os.path.realpath(externalsrcbuild):

                 # 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")
Signature · 6 lines
2.17.1

-- 
This Communication is Confidential. We only send and receive email on the
basis of the terms set out at www.taitradio.com/email_disclaimer 
<http://www.taitradio.com/email_disclaimer>
#3 lore raw

PATCH v2 1/1 externalsrc: No single-task lock if S != B

In reply to Douglas

From: Douglas Royds <[email protected]>

Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree.

---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +1 -1
index 3618b99a86..88408add71 100644
@@ -86,7 +86,7 @@ python () {
             if task.endswith("_setscene"):
                 # sstate is never going to work for external source trees, disable it
                 bb.build.deltask(task, d)
-            else:
+            elif os.path.realpath(externalsrc) == os.path.realpath(externalsrcbuild):
                 # 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")
 

--
2.17.1

#4 lore raw
Quoted 15 lines · Douglas Royds

From: Douglas Royds <[email protected]>

Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree.

---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +0 -0
index 3618b99a86..88408add71 100644

meta/classes/externalsrc.bbclass python () { · line 91

Quoted 7 lines
meta/classes/externalsrc.bbclass +1 -1
@@ -86,7 +86,7 @@ python () {
             if task.endswith("_setscene"):
                 # sstate is never going to work for external source trees, disable it
                 bb.build.deltask(task, d)
-            else:
+            elif os.path.realpath(externalsrc) == os.path.realpath(externalsrcbuild):
                 # 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")

Failed in testing unfortunately, looks like these can be None:

https://autobuilder.yoctoproject.org/typhoon/#/builders/97/builds/1893/steps/8/logs/step1c

Cheers,

Richard

#5 lore raw

PATCH v3 1/1 externalsrc: No single-task lock if S != B

In reply to Douglas

From: Douglas Royds <[email protected]>

Allow different recipes to build things from the one external source tree in parallel, but only if the build is happening outside the source tree.

---
 meta/classes/externalsrc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +1 -1
index d200129987..dd09395788 100644
@@ -85,7 +85,7 @@ python () {
             if task.endswith("_setscene"):
                 # sstate is never going to work for external source trees, disable it
                 bb.build.deltask(task, d)
-            else:
+            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")
 

--
2.17.1