]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: detect yum-builddep errors 4878/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 6 Jun 2015 10:28:03 +0000 (12:28 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sat, 6 Jun 2015 10:31:56 +0000 (12:31 +0200)
yum-builddep does not exit on error when an error happens: grep the
output for the error: string instead.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
install-deps.sh

index 6d3a5de92aa1c035ed9f44b31f8b5829bf910343..5ad41c69cd989f38ab877dfc113dafbe1991acfa 100755 (executable)
@@ -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