From: Nathan Cutler Date: Wed, 14 Feb 2018 11:51:09 +0000 (+0100) Subject: install-deps.sh: set python2 %bcond by environment X-Git-Tag: v13.0.2~162^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fe028f89b600e6e9e3a9f2a91a712202b88ba72c;p=ceph.git install-deps.sh: set python2 %bcond by environment 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 --- diff --git a/install-deps.sh b/install-deps.sh index 17c365a8eb4d..1f226d4437aa 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -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 {