]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: allow for more parallel builds
authorLoic Dachary <ldachary@redhat.com>
Fri, 4 Mar 2016 12:32:11 +0000 (19:32 +0700)
committerLoic Dachary <ldachary@redhat.com>
Wed, 16 Mar 2016 13:36:52 +0000 (14:36 +0100)
Builds are in parallel if the OS type / version and the SHA1 are
different. Having just one build at a time for a given SHA1 slows thing
down when there are more than a few supported OS.

Signed-off-by: Loic Dachary <loic@dachary.org>
tasks/buildpackages.py

index 35546609d86d09410182558c80f80917974d3a5e..8317e704af1c9d2d4779a4b8c670740ad56eb021 100644 (file)
@@ -167,8 +167,9 @@ def task(ctx, config):
             'ram': 1024, # MB
             'cpus': 1,
         }, select)
+        lock = "/tmp/buildpackages-" + sha1 + "-" + os_type + "-" + os_version
         cmd = (". " + os.environ['HOME'] + "/.ssh_agent ; " +
-               " flock --close /tmp/buildpackages-" + sha1 +
+               " flock --close " + lock +
                " make -C " + d +
                " CEPH_GIT_URL=" + teuth_config.get_ceph_git_url() +
                " CEPH_PKG_TYPE=" + pkg_type +