pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/rubygems The ``gem'' command doesn't exit with an...
details: https://anonhg.NetBSD.org/pkgsrc/rev/236bdf8ea7dd
branches: trunk
changeset: 540103:236bdf8ea7dd
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Mar 27 05:29:42 2008 +0000
description:
The ``gem'' command doesn't exit with an error if the install fails.
Manually check that the installation actually succeeds or exit with an
error so that the pkgsrc make process halts with the proper error code.
Suggestion for change by <seb> in private email.
diffstat:
misc/rubygems/rubygem.mk | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (50 lines):
diff -r 8e4b3a8e948a -r 236bdf8ea7dd misc/rubygems/rubygem.mk
--- a/misc/rubygems/rubygem.mk Thu Mar 27 04:47:10 2008 +0000
+++ b/misc/rubygems/rubygem.mk Thu Mar 27 05:29:42 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rubygem.mk,v 1.32 2008/03/24 18:48:54 jlam Exp $
+# $NetBSD: rubygem.mk,v 1.33 2008/03/27 05:29:42 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -112,6 +112,7 @@
GEM_NAME?= ${DISTNAME}
GEM_LIBDIR= ${GEM_HOME}/gems/${GEM_NAME}
GEM_DOCDIR= ${GEM_HOME}/doc/${GEM_NAME}
+GEM_CACHEDIR= ${GEM_HOME}/cache
# Installed gems have wrapper scripts that call the right interpreter,
# regardless of the #! line at the head of a script, so we can skip
@@ -199,6 +200,7 @@
_GEM_BUILD_TARGETS= _gem-${GEM_BUILD}-build
_GEM_BUILD_TARGETS+= _gem-build-buildroot
+_GEM_BUILD_TARGETS+= _gem-build-buildroot-check
.if !empty(GEM_CLEANBUILD)
_GEM_BUILD_TARGETS+= _gem-build-cleanbuild
.endif
@@ -213,6 +215,8 @@
_gem-gemspec-build:
${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${RUBYGEM} build ${GEM_SPECFILE}
+ ${RUN} test -f ${WRKSRC}/${GEM_NAME}.gem || \
+ ${FAIL_MSG} "Build of ${GEM_NAME}.gem failed."
BUILD_TARGET?= gem
@@ -238,6 +242,15 @@
@${STEP_MSG} "Installing gem into buildroot"
${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM} install ${_RUBYGEM_OPTIONS}
+# The ``gem'' command doesn't exit with a non-zero result even if the
+# install of the gem failed, so we do the check and return the proper exit
+# code ourselves.
+#
+.PHONY: _gem-build-buildroot-check
+_gem-build-buildroot-check:
+ ${RUN} test -f ${_RUBYGEM_BUILDROOT}${GEM_CACHE}/${GEM_NAME}.gem || \
+ ${FAIL_MSG} "Installing ${GEM_NAME}.gem into buildroot failed."
+
.if !empty(GEM_CLEANBUILD)
.PHONY: _gem-build-cleanbuild
_gem-build-cleanbuild:
Home |
Main Index |
Thread Index |
Old Index