rtomayko/rpg — pull request #25 by richmeyers (2011-10-12 20:46:16+00:00)
Title: Fix for issue #13 - propagate exit status when extension build fails

Cat of build log clears exit status, causing rpg to think that rpg-build succeeded when in fact it did not.

Attached change causes rpg-build to exit with the same code that extconf.rb exited with, which halts the build as follows:

# rpg install curb
prepare: calculating dependencies for curb ...
prepare: 0 of 1 packages already installed and up to date
install: installing 1 packages
package-install: curb 0.7.15
build: curb-0.7.15 ext
checking for curl-config... no
checking for main() in -lcurl... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
--with-curllib
--without-curllib
extconf.rb:18: Can't find libcurl or curl/curl.h (RuntimeError)

Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
options to extconf.
rpg-package-install: extension failed to build