[buildbot] phase1: reorder/regroup globals

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


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

commit 05d9842e77941bd165c7658987de16b0ddbfc62d
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Thu Oct 20 19:24:56 2022 +0200

    phase1: reorder/regroup globals
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase1/master.cfg | 68 ++++++++++++++++++++++++++++---------------------------
 1 file changed, 35 insertions(+), 33 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index 2e5076e..9c88daf 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -56,6 +56,41 @@ if "general" not in ini or "phase1" not in ini or "rsync" not in ini:
 
 inip1 = ini['phase1']
 
+# Globals
+work_dir = os.path.abspath(ini['general'].get("workdir", "."))
+scripts_dir = os.path.abspath("../scripts")
+
+config_seed = inip1.get("config_seed", "")
+
+repo_url = ini['repo'].get("url")
+repo_branch = ini['repo'].get("branch", "master")
+
+rsync_bin_url = ini['rsync'].get("binary_url")
+rsync_bin_key = ini['rsync'].get("binary_password")
+rsync_bin_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_url = ini['rsync'].get("source_url")
+rsync_src_key = ini['rsync'].get("source_password")
+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"]
+
+usign_key = None
+usign_comment = "untrusted comment: " + repo_branch.replace("-", " ").title() + " key"
+
+if ini.has_section("usign"):
+	usign_key = ini['usign'].get("key")
+	usign_comment = ini['usign'].get("comment", usign_comment)
+
+enable_kmod_archive = inip1.getboolean("kmod_archive", False)
+
+# PB port can be either a numeric port or a connection string
+pb_port = inip1.get("port") or 9989
+
 # This is the dictionary that the buildmaster pays attention to. We also use
 # a shorter alias to save typing.
 c = BuildmasterConfig = {}
@@ -105,8 +140,6 @@ for section in ini.sections():
 					NetLocks[lockname] = locks.MasterLock(lockname)
 			c['workers'].append(Worker(name, password, max_builds = 1, properties = sl_props))
 
-# PB port can be either a numeric port or a connection string
-pb_port = inip1.get("port") or 9989
 c['protocols'] = {'pb': {'port': pb_port}}
 
 # coalesce builds
@@ -197,37 +230,6 @@ c['prioritizeBuilders'] = prioritizeBuilders
 
 ####### CHANGESOURCES
 
-work_dir = os.path.abspath(ini['general'].get("workdir", "."))
-scripts_dir = os.path.abspath("../scripts")
-
-config_seed = inip1.get("config_seed", "")
-
-repo_url = ini['repo'].get("url")
-repo_branch = ini['repo'].get("branch", "master")
-
-rsync_bin_url = ini['rsync'].get("binary_url")
-rsync_bin_key = ini['rsync'].get("binary_password")
-rsync_bin_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_url = ini['rsync'].get("source_url")
-rsync_src_key = ini['rsync'].get("source_password")
-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"]
-
-usign_key = None
-usign_comment = "untrusted comment: " + repo_branch.replace("-", " ").title() + " key"
-
-if ini.has_section("usign"):
-	usign_key = ini['usign'].get("key")
-	usign_comment = ini['usign'].get("comment", usign_comment)
-
-enable_kmod_archive = inip1.getboolean("kmod_archive", False)
-
 
 # find targets
 targets = [ ]




More information about the lede-commits mailing list