[buildbot] phase1: FlattenList doesn't work on renderables

LEDE Commits lede-commits at lists.infradead.org
Mon May 15 08:39:27 PDT 2023


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/07ffa51834d28a356da412d1cd2e40e56ccc1142

commit 07ffa51834d28a356da412d1cd2e40e56ccc1142
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Tue Oct 25 13:08:50 2022 +0200

    phase1: FlattenList doesn't work on renderables
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase1/master.cfg | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index c19c6c8..52b2b8d 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -474,14 +474,16 @@ def MakeEnv(overrides=None, tryccache=False):
 	return env
 
 @properties.renderer
-def NetLockDl(props):
+def NetLockDl(props, extralock=None):
 	lock = None
+	locks = []
 	if props.hasProperty("dl_lock"):
 		lock = NetLocks[props["dl_lock"]]
 	if lock is not None:
-		return [lock.access('exclusive')]
-	else:
-		return []
+		locks.append(lock.access('exclusive'))
+	if extralock is not None:
+		locks.append(extralock)
+	return locks
 
 @properties.renderer
 def NetLockUl(props):
@@ -789,7 +791,7 @@ for target in targets:
 		command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "download", "V=s"],
 		env = MakeEnv(),
 		logEnviron = False,
-		locks = properties.FlattenList(NetLockDl, [dlLock.access('exclusive')]),
+		locks = NetLockDl.withArgs(dlLock.access('exclusive')),
 	))
 
 	factory.addStep(ShellCommand(




More information about the lede-commits mailing list