From: Yunchuan Wen Date: Sun, 24 Jun 2018 01:48:50 +0000 (+0800) Subject: install-deps: check the exit status for the $builddepcmd X-Git-Tag: v13.2.7~139^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be80007eb8018d2bbf545c4e77aaa4c0468306ee;p=ceph.git install-deps: check the exit status for the $builddepcmd in some case, the $builddepcmd will failed without any "error:" output. so we should check the exit status to handle it. Signed-off-by: Yunchuan Wen (cherry picked from commit 46e33d15a4132772a6bd11cd49f4181081bcdd55) --- diff --git a/install-deps.sh b/install-deps.sh index 41dfdd76ac64..474ef5d0289f 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -249,6 +249,7 @@ else munge_ceph_spec_in $DIR/ceph.spec $SUDO $yumdnf install -y \*rpm-macros $SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out + [ ${PIPESTATUS[0]} -ne 0 ] && exit 1 if [ -n "$dts_ver" ]; then ensure_decent_gcc_on_rh $dts_ver fi