pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Make a bad patch cause a fatal error again. This f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c16f9d4adddc
branches:  trunk
changeset: 494246:c16f9d4adddc
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat May 21 21:40:45 2005 +0000

description:
Make a bad patch cause a fatal error again.  This fixes a bug introduced
in revision 1.5 and fixes PR pkg/30297.

diffstat:

 mk/bsd.pkg.patch.mk |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 1dbd2c252905 -r c16f9d4adddc mk/bsd.pkg.patch.mk
--- a/mk/bsd.pkg.patch.mk       Sat May 21 20:24:46 2005 +0000
+++ b/mk/bsd.pkg.patch.mk       Sat May 21 21:40:45 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.patch.mk,v 1.9 2005/05/17 19:11:02 jlam Exp $
+# $NetBSD: bsd.pkg.patch.mk,v 1.10 2005/05/21 21:40:45 jlam Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and defines the
 # relevant variables and targets for the "patch" phase.
@@ -262,11 +262,15 @@
                if ${PATCH} -v >/dev/null 2>&1; then                    \
                        fuzz_flags=${PATCH_FUZZ_FACTOR:Q};              \
                fi;                                                     \
-               ${PATCH} $$fuzz_flags ${PATCH_ARGS} < $$i ||            \
+               if ${PATCH} $$fuzz_flags ${PATCH_ARGS} < $$i; then      \
+                       ${ECHO} "$$i" >> ${_PATCH_COOKIE_TMP:Q};        \
+               else                                                    \
                        ${ECHO_MSG} "Patch $$i failed";                 \
-               ${ECHO} "$$i" >> ${_PATCH_COOKIE_TMP:Q};                \
+                       fail="$$fail $$filename";                       \
+               fi;                                                     \
        done;                                                           \
        if ${TEST} -n "$$fail"; then                                    \
-               ${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \
+               ${ECHO_MSG} "Patching failed due to modified or broken patch file(s):"; \
+               ${ECHO_MSG} "   $$fail";                                \
                ${_PKGSRC_PATCH_FAIL};                                  \
        fi



Home | Main Index | Thread Index | Old Index