diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-08-07 23:35:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-08-07 23:35:28 +0000 |
commit | 09eefd1da93ef4bf70c32b7d06637a8317a082c2 (patch) | |
tree | 512c8949eff4c700e5b1c15c53514b938c71b7bc /eclass | |
parent | Fix building with libpng15 wrt #378145 by Diego Elio Pettenò (diff) | |
download | gentoo-2-09eefd1da93ef4bf70c32b7d06637a8317a082c2.tar.gz gentoo-2-09eefd1da93ef4bf70c32b7d06637a8317a082c2.tar.bz2 gentoo-2-09eefd1da93ef4bf70c32b7d06637a8317a082c2.zip |
epatch: log exit status of `patch` command #375983 by Toralf Förster
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index ca429c070704..466a09fa7519 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.359 2011/07/20 05:46:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.360 2011/08/07 23:35:28 vapier Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -382,9 +382,14 @@ epatch() { echo "PATCH COMMAND: patch -p${count} ${EPATCH_OPTS} < '${PATCH_TARGET}'" echo _epatch_draw_line "***** ${patchname} *****" + patch -p${count} ${EPATCH_OPTS} --dry-run -f < "${PATCH_TARGET}" 2>&1 + ret=$? + echo + echo "patch program exited with status ${ret}" + exit ${ret} ) >> "${STDERR_TARGET}" - if (patch -p${count} ${EPATCH_OPTS} --dry-run -f < "${PATCH_TARGET}") >> "${STDERR_TARGET}" 2>&1 ; then + if [ $? -eq 0 ] ; then ( _epatch_draw_line "***** ${patchname} *****" echo @@ -392,6 +397,10 @@ epatch() { echo _epatch_draw_line "***** ${patchname} *****" patch -p${count} ${EPATCH_OPTS} < "${PATCH_TARGET}" 2>&1 + ret=$? + echo + echo "patch program exited with status ${ret}" + exit ${ret} ) >> "${STDERR_TARGET}" if [ $? -ne 0 ] ; then |