From: Loic Dachary Date: Sat, 6 Jun 2015 10:28:03 +0000 (+0200) Subject: install-deps.sh: detect yum-builddep errors X-Git-Tag: v9.0.2~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=739ef0f9a3a065dbb1a584f8c324b86e5dbfea68;p=ceph.git install-deps.sh: detect yum-builddep errors yum-builddep does not exit on error when an error happens: grep the output for the error: string instead. Signed-off-by: Loic Dachary --- diff --git a/install-deps.sh b/install-deps.sh index 6d3a5de92aa1c..5ad41c69cd989 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -73,7 +73,8 @@ CentOS|Fedora|RedHatEnterpriseServer) ;; esac sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec - $SUDO yum-builddep -y $DIR/ceph.spec || exit 1 + $SUDO yum-builddep -y $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out + ! grep -q -i error: $DIR/yum-builddep.out || exit 1 ;; *SUSE*) sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec