summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1999-07-26 16:46:43 +0000
committeragc <agc@pkgsrc.org>1999-07-26 16:46:43 +0000
commit929d28c506a05a13efe3f0e8ede667800edbe99c (patch)
tree1ff8ab486679335b8d933752010937aa0f9be4cf /mk
parent682ae235483f2eb788df285002c40be11a77d40f (diff)
downloadpkgsrc-929d28c506a05a13efe3f0e8ede667800edbe99c.tar.gz
Re-visit the patch-sum modifications:
(a) if the patch file does not exist in the patch-sum file, then print a warning to the user, and ignore the patch file. In particular, do not exit with an error. (b) if the patch file's calculated checksum does not match the one recorded in the patch-sum file, print a warning to the user, and try the other patch files. Once all patch files have been attempted, exit with an error. Also, don't bother to check for patch-local-* files inside the checksum logic - they're already ignored at the head of the loop.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk33
1 files changed, 14 insertions, 19 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 2ea134c1519..34a272ac872 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.302 1999/07/24 23:23:04 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.303 1999/07/26 16:46:43 agc Exp $
#
# This file is in the public domain.
#
@@ -995,6 +995,7 @@ do-patch:
fi; \
else \
${ECHO_MSG} "===> Applying ${OPSYS} patches for ${PKGNAME}" ; \
+ fail=""; \
for i in ${PATCHDIR}/patch-*; do \
case $$i in \
${PATCHDIR}/patch-local-*) ;; \
@@ -1007,26 +1008,16 @@ do-patch:
calcsum=`${SED} -e '/\$$NetBSD.*/d' $$i | ${MD5}`; \
recorded=`${AWK} '$$1 == "MD5" && $$2 == "('$$filename')" { print $$4; }' ${PATCH_SUM_FILE} || ${TRUE}`; \
if [ "X$$recorded" = "X" ]; then \
- case "$$filename" in \
- patch-local-*) \
- ${ECHO_MSG} ">> Ignoring \"unofficial\" patch file $$i"; \
- continue \
- ;; \
- *) \
- ${ECHO_MSG} ">> Unknown patch file: $$i"; \
- ${ECHO_MSG} ">> If this is an obsolete patch, please delete it to build"; \
- ${ECHO_MSG} ">> this package (or run 'make makepatchsum' if you are working"; \
- ${ECHO_MSG} ">> on this package)."; \
- exit 1; \
- ;; \
- esac ; \
+ ${ECHO_MSG} "**************************************"; \
+ ${ECHO_MSG} "Ignoring unknown patch file: $$i"; \
+ ${ECHO_MSG} "**************************************"; \
+ continue; \
fi; \
if [ "X$$calcsum" != "X$$recorded" ]; then \
- ${ECHO_MSG} ">> Patch file $$i has been modified"; \
- ${ECHO_MSG} ">> If this is an obsolete patch, please delete it to build"; \
- ${ECHO_MSG} ">> this package (or run 'make makepatchsum' if you are working"; \
- ${ECHO_MSG} ">> on this package)."; \
- exit 1; \
+ ${ECHO_MSG} "**************************************"; \
+ ${ECHO_MSG} "Patch file $$i has been modified"; \
+ ${ECHO_MSG} "**************************************"; \
+ fail="$$fail $$filename"; \
fi; \
fi; \
if [ ${PATCH_DEBUG_TMP} = yes ]; then \
@@ -1037,6 +1028,10 @@ do-patch:
;; \
esac; \
done; \
+ if [ "X$$fail" != "X" ]; then \
+ ${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \
+ exit 1; \
+ fi; \
fi; \
fi
.endif