phase1: perform kmodupload only when needed
authorThibaut VARÈNE <hacks@slashdirt.org>
Tue, 16 May 2023 08:13:11 +0000 (10:13 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 16 May 2023 14:52:33 +0000 (16:52 +0200)
Fixes: 909e899
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
phase1/master.cfg

index c18ee74d746e201fbf3afa20f7bc9d2ce271442f..f004e36ee243544fd1b0776ec306cd606296e650 100644 (file)
@@ -506,6 +506,10 @@ def IsKmodArchiveEnabled(step):
        branch = step.getProperty("branch")
        return branch and branches[branch].get("kmod_archive")
 
+def IsKmodArchiveAndRsyncEnabled(step):
+       branch = step.getProperty("branch")
+       return bool(IsKmodArchiveEnabled(step) and branches[branch].get("bin_url"))
+
 def GetBaseVersion(branch):
        if re.match(r"^[^-]+-[0-9]+\.[0-9]+$", branch):
                return branch.split('-')[1]
@@ -1208,7 +1212,7 @@ for target in targets:
                haltOnFailure = True,
                logEnviron = False,
                locks = NetLockUl,
-               doStepIf = util.Transform(lambda a, b: bool(a and b), IsKmodArchiveEnabled, GetRsyncParams.withArgs("bin", "url")),
+               doStepIf = IsKmodArchiveAndRsyncEnabled,
        ))
 
        factory.addStep(ShellCommand(