]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps: check the exit status for the $builddepcmd
authorYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Sun, 24 Jun 2018 01:48:50 +0000 (09:48 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 4 Oct 2019 15:28:21 +0000 (17:28 +0200)
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 <yunchuan.wen@kylin-cloud.com>
(cherry picked from commit 46e33d15a4132772a6bd11cd49f4181081bcdd55)

install-deps.sh

index 51bfa4c37eb8c528c98691b3b36308090c4d2c58..798f77fd93619106cf5caeb8bd8a42d4bdc04b7c 100755 (executable)
@@ -234,6 +234,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