Skip to content

Commit

Permalink
install-deps.sh: detect yum-builddep errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ldachary committed Jun 6, 2015
1 parent 34e4dd9 commit 739ef0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install-deps.sh
Expand Up @@ -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

This comment has been minimized.

Copy link
@Aegeaner

Aegeaner Nov 12, 2017

We shouldn't break here.

This comment has been minimized.

Copy link
@tchaikov

tchaikov Nov 13, 2017

Contributor

@Aegeaner could you elaborate a little bit?

This comment has been minimized.

Copy link
@Aegeaner

Aegeaner Nov 13, 2017

i build ceph on Fedora 27 and some warning appeared but doesn't matter, but the script stopped and exited. I commented this line out and it worked.

This comment has been minimized.

Copy link
@tchaikov

tchaikov Nov 13, 2017

Contributor

if you could be more specific, probably we can have a better understanding of what's going wrong and fix it.

;;
*SUSE*)
sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
Expand Down

0 comments on commit 739ef0f

Please sign in to comment.