summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc>2000-01-14 11:39:31 +0000
committeragc <agc>2000-01-14 11:39:31 +0000
commitb89464c935bb4cac0f1b9182f111e0544a793403 (patch)
tree492e729be1579f4e136e338253634cbefcbe7c71 /mk
parent89e3f250cfcab03a7337efbc695914a97129c96e (diff)
downloadpkgsrc-b89464c935bb4cac0f1b9182f111e0544a793403.tar.gz
Add a check, inspired by Thor Lancelot Simon:
When an installed package is found as part of a DEPENDS pre-requisite, check its object format. If there is none in the installed package, that package was probably built before 29th September 1999, which was when the OBJECT_FMT definition was added to the BUILD_DEFS, so print a warning and continue. If the object format of the installed package and ${OBJECT_FMT} are the same, then continue. If the object format of the installed package and ${OBJECT_FMT} differ, then print an error message explaining the error, and exit.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 1c9a55d61d3..b94bd3d206d 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.391 2000/01/13 17:40:42 jwise Exp $
+# $NetBSD: bsd.pkg.mk,v 1.392 2000/01/14 11:39:31 agc Exp $
#
# This file is in the public domain.
#
@@ -2197,7 +2197,16 @@ misc-depends: uptodate-pkgtools
${_PKG_SILENT}${_PKG_DEBUG}package="`${ECHO} \"${dep}\" | ${SED} -e s/:.\*//`"; \
dir="`${ECHO} \"${dep}\" | ${SED} -e s/.\*://`"; \
found="`${PKG_INFO} -e \"$$package\" || ${TRUE}`"; \
- if [ X"$$found" != X"" ]; then \
+ if [ "X$$found" != "X" ]; then \
+ instobjfmt=`${PKG_INFO} -B "$$package" | ${AWK} '/^OBJECT_FMT/ { print $$2 }'`; \
+ if [ "X$$instobjfmt" = "X" ]; then \
+ ${ECHO} "WARNING: Unknown object format for installed package $$package - continuing"; \
+ elif [ "X$$instobjfmt" != "X${OBJECT_FMT}" ]; then \
+ ${ECHO} "Installed package $$package is an $$instobjfmt package."; \
+ ${ECHO} "You are building an ${OBJECT_FMT} package, which will not inter-operate."; \
+ ${ECHO} "Please update the $$package package to ${OBJECT_FMT}"; \
+ exit 1; \
+ fi; \
if [ `${ECHO} $$found | wc -w` -gt 1 ]; then \
${ECHO} '***' "WARNING: Dependency on '$$package' expands to several installed packages " ; \
${ECHO} " (" `${ECHO} $$found` ")." ; \