phase1: FlattenList doesn't work on renderables
authorThibaut VARÈNE <hacks@slashdirt.org>
Tue, 25 Oct 2022 11:08:50 +0000 (13:08 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index c19c6c80f659d96f403493c37bbc536c1fb81f41..52b2b8d455ad00351b77d2bb43ac0e34c87f9666 100644 (file)
@@ -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(