]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
build_debs.sh: Partial fix for building arch independent packages.
authorGary Lowell <glowell@inktank.com>
Mon, 17 Dec 2012 05:55:29 +0000 (21:55 -0800)
committerGary Lowell <glowell@inktank.com>
Mon, 17 Dec 2012 05:55:29 +0000 (21:55 -0800)
We only want to build the architecture independent packages once.
The i386 platform has been picked for that, and by convention there
should only be one i386 host in the deb_hosts list.  For this host
the -b option is supplied in debbuildopts which builds the binary
(No source) version of arch dependent and independent packages.  For
all other hosts the pbuilder --binary-arch flag is supplied which
builds binary arch dependent packages only.

build_debs.sh

index f19885a886fc75f3864b68a0698fa05ce78242dc..e5246a4bb127ce8cb55d599d902157c61af3bbd2 100755 (executable)
@@ -39,17 +39,27 @@ do
 #    $bindir/update_pbuilder.sh $pbuilddir $dist
 
     echo building debs for $dist
-    pbuilder build \
-       --binary-arch \
-       --distribution $dist \
-       --basetgz $pbuilddir/$dist.tgz \
-       --buildresult $releasedir/$cephver \
-       --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
-       $releasedir/$cephver/ceph_$bpvers.dsc
-    
+    if [ `dpkg-architecture -qDEB_BUILD_ARCH` = "i386" ] ; then
+        #  Binary only architecture dependent and independent
+        pbuilder build \
+            --distribution $dist \
+            --basetgz $pbuilddir/$dist.tgz \
+            --buildresult $releasedir/$cephver \
+            --debbuildopts "-j`grep -c processor /proc/cpuinfo` -b" \
+            $releasedir/$cephver/ceph_$bpvers.dsc
+    else
+        #  Binary only architecture dependent
+        pbuilder build \
+            --binary-arch \
+            --distribution $dist \
+            --basetgz $pbuilddir/$dist.tgz \
+            --buildresult $releasedir/$cephver \
+            --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
+            $releasedir/$cephver/ceph_$bpvers.dsc
+    fi
 done
 
-
 # do lintian checks
 for dist in $dists
 do