]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: set python2 %bcond by environment 20436/head
authorNathan Cutler <ncutler@suse.com>
Wed, 14 Feb 2018 11:51:09 +0000 (12:51 +0100)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Feb 2018 13:12:12 +0000 (14:12 +0100)
If there is no /usr/bin/python2 we need to set %bcond_with python2.

Fixes: http://tracker.ceph.com/issues/22999
Signed-off-by: Nathan Cutler <ncutler@suse.com>
install-deps.sh

index 17c365a8eb4d8fd3fd175b9501b99e2380dae9b0..1f226d4437aa03e2ec7db64b76912e7d8bdca17c 100755 (executable)
@@ -24,6 +24,11 @@ export LC_ALL=C # the following is vulnerable to i18n
 function munge_ceph_spec_in {
     local OUTFILE=$1
     sed -e 's/@//g' -e 's/%bcond_with make_check/%bcond_without make_check/g' < ceph.spec.in > $OUTFILE
+    if type python2 > /dev/null 2>&1 ; then
+        sed -i -e 's/%bcond_with python2/%bcond_without python2/g' $OUTFILE
+    else
+        sed -i -e 's/%bcond_without python2/%bcond_with python2/g' $OUTFILE
+    fi
 }
 
 function ensure_decent_gcc_on_deb {