phase2: max_builds is always set to 1
[buildbot.git] / phase2 / master.cfg
index c0562fcce78d4856a387b5366fb09474623d91b3..1267cf137782f319da8acda27c9c323b54790bd9 100644 (file)
@@ -62,9 +62,6 @@ c = BuildmasterConfig = {}
 
 worker_port = 9990
 persistent = False
-tree_expire = 0
-git_ssh = False
-git_ssh_key = None
 
 if ini.has_option("phase2", "port"):
        worker_port = ini.get("phase2", "port")
@@ -72,19 +69,7 @@ if ini.has_option("phase2", "port"):
 if ini.has_option("phase2", "persistent"):
        persistent = ini.getboolean("phase2", "persistent")
 
-if ini.has_option("phase2", "expire"):
-       tree_expire = ini.getint("phase2", "expire")
-
-if ini.has_option("general", "git_ssh"):
-       git_ssh = ini.getboolean("general", "git_ssh")
-
-if ini.has_option("general", "git_ssh_key"):
-       git_ssh_key = ini.get("general", "git_ssh_key")
-else:
-       git_ssh = False
-
 c['workers'] = []
-max_builds = dict()
 
 for section in ini.sections():
        if section.startswith("worker "):
@@ -92,21 +77,12 @@ for section in ini.sections():
                        ini.has_option(section, "phase") and ini.getint(section, "phase") == 2:
                        name = ini.get(section, "name")
                        password = ini.get(section, "password")
-                       sl_props = { 'shared_wd': False }
-                       max_builds[name] = 1
-
-                       if ini.has_option(section, "builds"):
-                               max_builds[name] = ini.getint(section, "builds")
-
-                       if max_builds[name] == 1:
-                               sl_props['shared_wd'] = True
+                       sl_props = { 'shared_wd': True }
 
                        if ini.has_option(section, "shared_wd"):
                                sl_props['shared_wd'] = ini.getboolean(section, "shared_wd")
-                               if sl_props['shared_wd'] and (max_builds != 1):
-                                       raise ValueError('max_builds must be 1 with shared workdir!')
 
-                       c['workers'].append(Worker(name, password, max_builds = max_builds[name], properties = sl_props))
+                       c['workers'].append(Worker(name, password, max_builds = 1, properties = sl_props))
 
 # 'workerPortnum' defines the TCP port to listen on for connections from workers.
 # This must match the value configured into the buildworkers (with their
@@ -291,13 +267,6 @@ def GetDirectorySuffix(props):
                        return "-%02d.%02d" %(int(m.group(1)), int(m.group(2)))
        return ""
 
-@properties.renderer
-def GetNumJobs(props):
-       if props.hasProperty("workername") and props.hasProperty("nproc"):
-               return str(int(props["nproc"]) / max_builds[props["workername"]])
-       else:
-               return "1"
-
 @properties.renderer
 def GetCwd(props):
        if props.hasProperty("builddir"):
@@ -470,21 +439,6 @@ for arch in arches:
                        haltOnFailure = True,
                        timeout = 2400))
 
-       # expire tree if needed
-       elif tree_expire > 0:
-               factory.addStep(FileDownload(
-                       mastersrc = scripts_dir + '/expire.sh',
-                       workerdest = "../expire.sh",
-                       mode = 0o755))
-
-               factory.addStep(ShellCommand(
-                       name = "expire",
-                       description = "Checking for build tree expiry",
-                       command = ["./expire.sh", str(tree_expire)],
-                       workdir = ".",
-                       haltOnFailure = True,
-                       timeout = 2400))
-
        factory.addStep(ShellCommand(
                name = "mksdkdir",
                description = "Preparing SDK directory",
@@ -574,36 +528,13 @@ for arch in arches:
                command = ["./ccache.sh"],
                haltOnFailure = True))
 
-       if git_ssh:
-               factory.addStep(StringDownload(
-                       name = "dlgitclonekey",
-                       s = git_ssh_key,
-                       workerdest = "../git-clone.key",
-                       mode = 0o600))
-
-               factory.addStep(ShellCommand(
-                       name = "patchfeedsconf",
-                       description = "Patching feeds.conf",
-                       workdir = "build/sdk",
-                       command = "sed -e 's#https://#ssh://git@#g' feeds.conf.default > feeds.conf",
-                       haltOnFailure = True))
-
        factory.addStep(ShellCommand(
                name = "updatefeeds",
                description = "Updating feeds",
                workdir = "build/sdk",
                command = ["./scripts/feeds", "update", "-f"],
-               env = {'GIT_SSH_COMMAND': Interpolate("ssh -o IdentitiesOnly=yes -o IdentityFile=%(kw:cwd)s/git-clone.key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no", cwd=GetCwd)} if git_ssh else {},
                haltOnFailure = True))
 
-       if git_ssh:
-               factory.addStep(ShellCommand(
-                       name = "rmfeedsconf",
-                       description = "Removing feeds.conf",
-                       workdir = "build/sdk",
-                       command=["rm", "feeds.conf"],
-                       haltOnFailure = True))
-
        factory.addStep(ShellCommand(
                name = "installfeeds",
                description = "Installing feeds",
@@ -626,7 +557,7 @@ for arch in arches:
                description = "Building packages",
                workdir = "build/sdk",
                timeout = 3600,
-               command = ["make", Interpolate("-j%(kw:jobs)s", jobs=GetNumJobs), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_AUTOREMOVE=y", "CONFIG_SIGNED_PACKAGES="],
+               command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_AUTOREMOVE=y", "CONFIG_SIGNED_PACKAGES="],
                env = {'CCACHE_BASEDIR': Interpolate("%(kw:cwd)s", cwd=GetCwd)},
                haltOnFailure = True))