[buildbot] phase1: remove GetCwd()

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


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

commit 83c5f0fa0a2a01ab39449c4b68b078132787e9f1
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Thu Oct 20 11:33:10 2022 +0200

    phase1: remove GetCwd()
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 phase1/master.cfg | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index 38df7f5..7698f00 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -475,15 +475,6 @@ def GetCXX(props):
 	else:
 		return "g++"
 
- at properties.renderer
-def GetCwd(props):
-	if props.hasProperty("builddir"):
-		return props["builddir"]
-	elif props.hasProperty("workdir"):
-		return props["workdir"]
-	else:
-		return "/"
-
 @properties.renderer
 def GetCCache(props):
 	if props.hasProperty("ccache_command") and "ccache" in props["ccache_command"]:
@@ -506,8 +497,8 @@ def MakeEnv(overrides=None, tryccache=False):
 		'CCXX': Interpolate("%(kw:cxx)s", cxx=GetCXX),
 	}
 	if tryccache:
-		env['CC'] = Interpolate("%(kw:cwd)s/ccache_cc.sh", cwd=GetCwd)
-		env['CXX'] = Interpolate("%(kw:cwd)s/ccache_cxx.sh", cwd=GetCwd)
+		env['CC'] = Interpolate("%(prop:builddir)s/ccache_cc.sh")
+		env['CXX'] = Interpolate("%(prop:builddir)s/ccache_cxx.sh")
 		env['CCACHE'] = Interpolate("%(kw:ccache)s", ccache=GetCCache)
 	else:
 		env['CC'] = env['CCC']
@@ -937,7 +928,7 @@ for target in targets:
 		property = "kernelversion",
 		description = "Finding the effective Kernel version",
 		command = "make --no-print-directory -C target/linux/ val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | xargs printf '%s-%s-%s\\n'",
-		env = { 'TOPDIR': Interpolate("%(kw:cwd)s/build", cwd=GetCwd) }
+		env = { 'TOPDIR': Interpolate("%(prop:builddir)s/build") }
 	))
 
 	factory.addStep(ShellCommand(




More information about the lede-commits mailing list