From 739ef0f9a3a065dbb1a584f8c324b86e5dbfea68 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 6 Jun 2015 12:28:03 +0200 Subject: [PATCH] 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 --- install-deps.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3