pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add a knob PKGSRC_SHOW_PATCH_ERRORMSG to control wh...
details: https://anonhg.NetBSD.org/pkgsrc/rev/00ee4660d675
branches: trunk
changeset: 479888:00ee4660d675
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Wed Aug 25 04:09:10 2004 +0000
description:
Add a knob PKGSRC_SHOW_PATCH_ERRORMSG to control whether the newly
verbose message displayed on patch failure is in fact displayed on
patch failure. It defaults to "no" if PKG_DEVELOPER is defined,
"yes" otherwise. While here, rename PKG_PATCH_FAIL to PKGSRC_PATCH_FAIL.
diffstat:
mk/bsd.pkg.defaults.mk | 11 ++++++++++-
mk/bsd.pkg.mk | 14 +++++++++-----
2 files changed, 19 insertions(+), 6 deletions(-)
diffs (77 lines):
diff -r 7d311e414019 -r 00ee4660d675 mk/bsd.pkg.defaults.mk
--- a/mk/bsd.pkg.defaults.mk Wed Aug 25 02:20:23 2004 +0000
+++ b/mk/bsd.pkg.defaults.mk Wed Aug 25 04:09:10 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.277 2004/08/10 05:59:45 schmonz Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.278 2004/08/25 04:09:10 schmonz Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -119,6 +119,15 @@
# Possible: "yes", not "yes"
# Default: "yes"
+.if defined(PKG_DEVELOPER)
+PKGSRC_SHOW_PATCH_ERRORMSG?=no
+.else
+PKGSRC_SHOW_PATCH_ERRORMSG?=yes
+.endif
+# Print a potentially helpful error message when the "patch" stage fails
+# Possible: "yes", not "yes"
+# Default: "no" if PKG_DEVELOPER is defined, "yes" otherwise
+
PKGSRC_RUN_TEST?= no
# Run test target before install
# Possible: yes, no
diff -r 7d311e414019 -r 00ee4660d675 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Wed Aug 25 02:20:23 2004 +0000
+++ b/mk/bsd.pkg.mk Wed Aug 25 04:09:10 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1492 2004/08/24 00:27:13 tv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1493 2004/08/25 04:09:10 schmonz Exp $
#
# This file is in the public domain.
#
@@ -568,7 +568,10 @@
PATCH_DIST_CAT.${i:S/=/--/}?= { patchfile=${i}; ${PATCH_DIST_CAT}; }
.endfor
-PKG_PATCH_FAIL= \
+.if empty(PKGSRC_SHOW_PATCH_ERRORMSG:M[yY][eE][sS])
+PKGSRC_PATCH_FAIL= exit 1
+.else
+PKGSRC_PATCH_FAIL= \
if [ -n "${PKG_OPTIONS}" ] || [ -n "${_LOCALPATCHFILES}" ]; then \
${ECHO} "=========================================================================="; \
${ECHO}; \
@@ -577,6 +580,7 @@
${ECHO}; \
${ECHO} "=========================================================================="; \
fi; exit 1
+.endif
EXTRACT_SUFX?= .tar.gz
@@ -2085,7 +2089,7 @@
fi; \
${PATCH_DIST_CAT.${i:S/=/--/}} | \
${PATCH} ${PATCH_DIST_ARGS.${i:S/=/--/}} \
- || { ${ECHO} "Patch ${i} failed"; ${PKG_PATCH_FAIL}; }
+ || { ${ECHO} "Patch ${i} failed"; ${PKGSRC_PATCH_FAIL}; }
. endfor
. endif
${_PKG_SILENT}${_PKG_DEBUG} \
@@ -2162,11 +2166,11 @@
fuzz=""; \
${PATCH} -v > /dev/null 2>&1 && fuzz="${PATCH_FUZZ_FACTOR}"; \
${PATCH} $$fuzz ${PATCH_ARGS} < $$i || \
- { ${ECHO} Patch $$i failed ; ${PKG_PATCH_FAIL}; }; \
+ { ${ECHO} Patch $$i failed ; ${PKGSRC_PATCH_FAIL}; }; \
done; \
if [ "X$$fail" != "X" ]; then \
${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \
- ${PKG_PATCH_FAIL}; \
+ ${PKGSRC_PATCH_FAIL}; \
fi; \
fi
.endif
Home |
Main Index |
Thread Index |
Old Index