[buildbot] phase1: use single var for rsync_bin_defopts and rsync_src_defopts

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


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

commit 6362dc2e197fe894f26b79407441f1f2869e81ce
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Mon Oct 24 18:08:23 2022 +0200

    phase1: use single var for rsync_bin_defopts and rsync_src_defopts
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase1/master.cfg | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index eed887b..9f4a343 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -63,16 +63,11 @@ scripts_dir = os.path.abspath("../scripts")
 repo_url = ini['repo'].get("url")
 repo_branch = ini['repo'].get("branch", "master")
 
-rsync_bin_defopts = ["-v", "-4", "--timeout=120"]
+rsync_defopts = ["-v", "-4", "--timeout=120"]
 
 #if rsync_bin_url.find("::") > 0 or rsync_bin_url.find("rsync://") == 0:
 #	rsync_bin_defopts += ["--contimeout=20"]
 
-rsync_src_defopts = ["-v", "-4", "--timeout=120"]
-
-#if rsync_src_url.find("::") > 0 or rsync_src_url.find("rsync://") == 0:
-#	rsync_src_defopts += ["--contimeout=20"]
-
 branches = {}
 
 def ini_parse_branch(section):
@@ -995,7 +990,7 @@ for target in targets:
 	factory.addStep(ShellCommand(
 		name = "dirupload",
 		description = "Uploading directory structure",
-		command = ["rsync", "-az"] + rsync_bin_defopts + ["tmp/upload/", Interpolate("%(kw:url)s/", url=GetRsyncParams.withArgs("bin", "url"))],
+		command = ["rsync", "-az"] + rsync_defopts + ["tmp/upload/", Interpolate("%(kw:url)s/", url=GetRsyncParams.withArgs("bin", "url"))],
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
 		haltOnFailure = True,
 		logEnviron = False,
@@ -1006,7 +1001,7 @@ for target in targets:
 	factory.addStep(ShellCommand(
 		name = "target-sha256sums",
 		description = "Fetching remote sha256sums for target",
-		command = ["rsync", "-z"] + rsync_bin_defopts + [Interpolate("%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/sha256sums", url=GetRsyncParams.withArgs("bin", "url"), target=ts[0], subtarget=ts[1], prefix=GetVersionPrefix), "target-sha256sums"],
+		command = ["rsync", "-z"] + rsync_defopts + [Interpolate("%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/sha256sums", url=GetRsyncParams.withArgs("bin", "url"), target=ts[0], subtarget=ts[1], prefix=GetVersionPrefix), "target-sha256sums"],
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
 		logEnviron = False,
 		haltOnFailure = False,
@@ -1040,7 +1035,7 @@ for target in targets:
 	factory.addStep(ShellCommand(
 		name = "targetupload",
 		description = "Uploading target files",
-		command=["../rsync.sh", "--exclude=/kmods/", "--files-from=rsynclist", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1])] + rsync_bin_defopts +
+		command=["../rsync.sh", "--exclude=/kmods/", "--files-from=rsynclist", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1])] + rsync_defopts +
 			["-a", Interpolate("bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/", target=ts[0], subtarget=ts[1]),
 			Interpolate("%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/", url=GetRsyncParams.withArgs("bin", "url"), target=ts[0], subtarget=ts[1], prefix=GetVersionPrefix)],
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
@@ -1052,7 +1047,7 @@ for target in targets:
 	factory.addStep(ShellCommand(
 		name = "targetprune",
 		description = "Pruning target files",
-		command=["../rsync.sh", "--exclude=/kmods/", "--delete", "--existing", "--ignore-existing", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1])] + rsync_bin_defopts +
+		command=["../rsync.sh", "--exclude=/kmods/", "--delete", "--existing", "--ignore-existing", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1])] + rsync_defopts +
 			["-a", Interpolate("bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/", target=ts[0], subtarget=ts[1]),
 			Interpolate("%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/", url=GetRsyncParams.withArgs("bin", "url"), target=ts[0], subtarget=ts[1], prefix=GetVersionPrefix)],
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
@@ -1064,7 +1059,7 @@ for target in targets:
 	factory.addStep(ShellCommand(
 		name = "kmodupload",
 		description = "Uploading kmod archive",
-		command=["../rsync.sh", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1])] + rsync_bin_defopts +
+		command=["../rsync.sh", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1])] + rsync_defopts +
 			["-a", Interpolate("bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/%(prop:kernelversion)s/", target=ts[0], subtarget=ts[1]),
 			Interpolate("%(kw:url)s/%(kw:prefix)stargets/%(kw:target)s/%(kw:subtarget)s/kmods/%(prop:kernelversion)s/", url=GetRsyncParams.withArgs("bin", "url"), target=ts[0], subtarget=ts[1], prefix=GetVersionPrefix)],
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("bin", "key")) },
@@ -1084,7 +1079,7 @@ for target in targets:
 	factory.addStep(ShellCommand(
 		name = "sourceupload",
 		description = "Uploading source archives",
-		command=["../rsync.sh", "--files-from=sourcelist", "--size-only", "--delay-updates"] + rsync_src_defopts +
+		command=["../rsync.sh", "--files-from=sourcelist", "--size-only", "--delay-updates"] + rsync_defopts +
 			[Interpolate("--partial-dir=.~tmp~%(kw:target)s~%(kw:subtarget)s~%(prop:workername)s", target=ts[0], subtarget=ts[1]), "-a", "dl/", Interpolate("%(kw:url)s/", url=GetRsyncParams.withArgs("src", "url"))],
 		env={ 'RSYNC_PASSWORD': Interpolate("%(kw:key)s", key=GetRsyncParams.withArgs("src", "key")) },
 		haltOnFailure = True,




More information about the lede-commits mailing list