phase1: perform rsync steps only if configured
authorThibaut VARÈNE <hacks@slashdirt.org>
Tue, 25 Oct 2022 17:48:46 +0000 (19:48 +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 64d350b7fc8248ba7f7f9def2bcb7144a3a8962a..424fc9ff1e490a21cce72c9e402799adacfed3b7 100644 (file)
@@ -1027,6 +1027,7 @@ for target in targets:
                haltOnFailure = True,
                logEnviron = False,
                locks = NetLockUl,
+               doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
        ))
 
        # download remote sha256sums to 'target-sha256sums'
@@ -1040,6 +1041,7 @@ for target in targets:
                haltOnFailure = False,
                flunkOnFailure = False,
                warnOnFailure = False,
+               doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
        ))
 
        # build list of files to upload
@@ -1076,6 +1078,7 @@ for target in targets:
                env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
                haltOnFailure = True,
                logEnviron = False,
+               doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
        ))
 
        # delete files which don't exist locally
@@ -1090,6 +1093,7 @@ for target in targets:
                haltOnFailure = True,
                logEnviron = False,
                locks = NetLockUl,
+               doStepIf = util.Transform(bool, GetRsyncParams.withArgs("bin", "url")),
        ))
 
        factory.addStep(ShellCommand(
@@ -1103,7 +1107,7 @@ for target in targets:
                haltOnFailure = True,
                logEnviron = False,
                locks = NetLockUl,
-               doStepIf = IsKmodArchiveEnabled,
+               doStepIf = util.Transform(lambda a, b: bool(a and b), IsKmodArchiveEnabled, GetRsyncParams.withArgs("bin", "url")),
        ))
 
        factory.addStep(ShellCommand(
@@ -1124,6 +1128,7 @@ for target in targets:
                haltOnFailure = True,
                logEnviron = False,
                locks = NetLockUl,
+               doStepIf = util.Transform(bool, GetRsyncParams.withArgs("src", "url")),
        ))
 
        factory.addStep(ShellCommand(