]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: do not -jX on dumpling
authorLoic Dachary <ldachary@redhat.com>
Fri, 20 Nov 2015 12:46:28 +0000 (13:46 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 20 Nov 2015 12:46:28 +0000 (13:46 +0100)
http://tracker.ceph.com/issues/13845 Refs: #13845

Signed-off-by: Loic Dachary <loic@dachary.org>
tasks/buildpackages/common.sh
tasks/buildpackages/make-deb.sh
tasks/buildpackages/make-rpm.sh

index ef8252c1f693f825b11adc22a8dcb09e22d8335e..1085bc08ab5c44605ab242cab62004182e419c83 100644 (file)
@@ -123,8 +123,28 @@ function test_link_same() {
     rm -fr $d
 }
 
+function maybe_parallel() {
+    local nproc=$1
+    local vers=$2
+
+    if echo $vers | grep --quiet '0\.67' ; then
+        return
+    fi
+
+    if test $nproc -gt 1 ; then
+        echo -j${nproc}
+    fi
+}
+
+function test_maybe_parallel() {
+    test "$(maybe_parallel 1 0.72)" = "" || return 1
+    test "$(maybe_parallel 8 0.67)" = "" || return 1
+    test "$(maybe_parallel 8 0.72)" = "-j8" || return 1
+}
+
 if test "$1" = "TEST" ; then
     shopt -s -o xtrace
     PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}:  '
     test_link_same
+    test_maybe_parallel
 fi
index 7d67ee575f45adf601d75572023fb510eb313a2d..a20307e4020517d0479562ff9364f8c842095eea 100755 (executable)
@@ -102,14 +102,9 @@ function build_package() {
         DEBEMAIL="contact@ceph.com" dch -D $codename --force-distribution -b -v "$dvers" "new version"
     fi
     #
-    # create the packages
-    # a) with ccache to speed things up when building repeatedly
-    # b) do not sign the packages
-    # c) use half of the available processors
+    # create the packages (with ccache)
     #
-    if test $NPROC -gt 1 ; then
-        j=-j${NPROC}
-    fi
+    j=$(maybe_parallel $NPROC $vers)
     PATH=/usr/lib/ccache:$PATH dpkg-buildpackage $j -uc -us
 }
 
index 34edb6bab3a3e026e50d6a01c3611a848d0d9be2..754b0a430e3507c203ab31879a854e493a8b4db9 100755 (executable)
@@ -47,7 +47,6 @@ releasedir=$base/$(lsb_release -si)/WORKDIR
 # d) contains the short hash of the commit
 #
 vers=$(git describe --long --match "v*" | sed s/^v//)
-: ${NPROC:=$(nproc)}
 ceph_dir=$(pwd)
 
 #