pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk If patching fails and either of PKG_OPTIONS and LOC...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d51ce626efb1
branches:  trunk
changeset: 479510:d51ce626efb1
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Mon Aug 16 01:56:03 2004 +0000

description:
If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
defined, note thatthe patch failure may be due to incompatible
build options and/or local patches, and suggest building with fewer.

diffstat:

 mk/bsd.pkg.mk |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (49 lines):

diff -r 747f9cae785f -r d51ce626efb1 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Sun Aug 15 22:53:15 2004 +0000
+++ b/mk/bsd.pkg.mk     Mon Aug 16 01:56:03 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1488 2004/08/07 15:58:59 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1489 2004/08/16 01:56:03 schmonz Exp $
 #
 # This file is in the public domain.
 #
@@ -571,6 +571,16 @@
 PATCH_DIST_CAT.${i:S/=/--/}?=  { patchfile=${i}; ${PATCH_DIST_CAT}; }
 .endfor
 
+PKG_PATCH_FAIL=                                                                \
+if [ -n "${PKG_OPTIONS}" ] || [ -n "${_LOCALPATCHFILES}" ]; then       \
+       ${ECHO} "==========================================================================";                                                           \
+       ${ECHO};                                                        \
+       ${ECHO} "Some of the selected build options and/or local patches may be incompatible.";                                                         \
+       ${ECHO} "Please try building with fewer options or patches.";   \
+       ${ECHO};                                                        \
+       ${ECHO} "==========================================================================";                                                           \
+fi; exit 1
+
 EXTRACT_SUFX?=         .tar.gz
 
 # We need bzip2 for PATCHFILES with .bz2 suffix.
@@ -2070,7 +2080,7 @@
        fi;                                                             \
        ${PATCH_DIST_CAT.${i:S/=/--/}} |                                \
        ${PATCH} ${PATCH_DIST_ARGS.${i:S/=/--/}}                        \
-               || { ${ECHO} "Patch ${i} failed"; exit 1; }
+               || { ${ECHO} "Patch ${i} failed"; ${PKG_PATCH_FAIL}; }
 .    endfor
 .  endif
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
@@ -2147,11 +2157,11 @@
                        fuzz="";                                        \
                        ${PATCH} -v > /dev/null 2>&1 && fuzz="${PATCH_FUZZ_FACTOR}"; \
                        ${PATCH} $$fuzz ${PATCH_ARGS} < $$i ||          \
-                               { ${ECHO} Patch $$i failed ; exit 1; }; \
+                               { ${ECHO} Patch $$i failed ; ${PKG_PATCH_FAIL}; };      \
                done;                                                   \
                if [ "X$$fail" != "X" ]; then                           \
                        ${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \
-                       exit 1;                                         \
+                       ${PKG_PATCH_FAIL};                                              \
                fi;                                                     \
        fi
 .endif



Home | Main Index | Thread Index | Old Index