Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for issue #13 - propagate exit status when extension build fails #25

Merged
merged 1 commit into from

2 participants

@richmeyers

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
@rtomayko
Owner

Sorry, I missed this somehow. Looks great.

@rtomayko rtomayko merged commit f3ceaba into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  rpg-build.sh
View
2  rpg-build.sh
@@ -27,6 +27,8 @@ do
$RPGSHOWBUILD && cat build.log 1>&2
find "$(dirname "$file")" -name "*.$(ruby_dlext)"
else
+ status=$?
cat build.log 1>&2
+ exit $status
fi
done
Something went wrong with that request. Please try again.