for depends, always run checks on fullpkgname vs pkgspec upfront.
exit if the dependency doesn't match. then do the actual dependency and the normal tests. stop looking at full pkgnames list, makes no sense, even configure depends can use the required ,-subpackage if they want. This allows stuff such as BUILD_DEPENDS = dir>=5.0:configure to get out early if the tree is not uptodate, instead of first configuring then getting out (problem noticed by landry@). tested by landry@ and jasper@
This commit is contained in:
parent
e62a4b54b7
commit
904b7b580f
@ -1,6 +1,6 @@
|
|||||||
#-*- mode: Makefile; tab-width: 4; -*-
|
#-*- mode: Makefile; tab-width: 4; -*-
|
||||||
# ex:ts=4 sw=4 filetype=make:
|
# ex:ts=4 sw=4 filetype=make:
|
||||||
# $OpenBSD: bsd.port.mk,v 1.1098 2011/07/12 08:08:01 ajacoutot Exp $
|
# $OpenBSD: bsd.port.mk,v 1.1099 2011/07/12 10:04:00 espie Exp $
|
||||||
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
||||||
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
||||||
#
|
#
|
||||||
@ -1647,12 +1647,12 @@ _parse_spec = \
|
|||||||
esac; unset IFS; ${_flavor_fragment}
|
esac; unset IFS; ${_flavor_fragment}
|
||||||
|
|
||||||
_compute_default = \
|
_compute_default = \
|
||||||
if ! default=`eval $$toset ${MAKE} _print-packagename`; then \
|
if ! default=`eval $$toset exec ${MAKE} _print-packagename`; then \
|
||||||
echo 1>&2 "Problem with dependency ${_i}"; \
|
echo 1>&2 "Problem with dependency ${_i}"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_set_pkg2default= pkg=`eval $$toset ${MAKE} _print-pkgspec`
|
_set_pkg2default= pkg=`eval $$toset exec ${MAKE} _print-pkgspec`
|
||||||
_set_stem2default=stem=`echo $$default|${_version2stem}`; \
|
_set_stem2default=stem=`echo $$default|${_version2stem}`; \
|
||||||
pkg="$$stem$${pkg\#STEM}"
|
pkg="$$stem$${pkg\#STEM}"
|
||||||
|
|
||||||
@ -1912,20 +1912,26 @@ ${WRKDIR}/.dep-${_i:C,>=,ge-,g:C,<=,le-,g:C,<,lt-,g:C,>,gt-,g:C,\*,ANY,g:C,[|:/=
|
|||||||
exit 1;; \
|
exit 1;; \
|
||||||
esac; \
|
esac; \
|
||||||
toset="$$toset _SOLVING_DEP=Yes"; \
|
toset="$$toset _SOLVING_DEP=Yes"; \
|
||||||
|
${_compute_default}; \
|
||||||
case "X$$pkg" in \
|
case "X$$pkg" in \
|
||||||
X) \
|
X) \
|
||||||
if ! pkg=`eval $$toset ${MAKE} _print-pkgspec`; \
|
if ! ${_set_pkg2default}; \
|
||||||
then \
|
then \
|
||||||
${ECHO_MSG} "===> Error in evaluating dependency ${_i}"; \
|
${ECHO_MSG} "===> Error in evaluating dependency ${_i}"; \
|
||||||
${REPORT_PROBLEM}; \
|
${REPORT_PROBLEM}; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi;; \
|
fi;; \
|
||||||
XSTEM*) \
|
XSTEM*) \
|
||||||
if default=`eval $$toset ${MAKE} _print-packagename`; \
|
${_set_stem2default};; \
|
||||||
then \
|
|
||||||
${_set_stem2default}; \
|
|
||||||
fi;; \
|
|
||||||
esac; \
|
esac; \
|
||||||
|
what=$$pkg; \
|
||||||
|
if ! ${PKG_INFO} ${PKGDB_LOCK} -q -r "$$pkg" $$default; \
|
||||||
|
then \
|
||||||
|
: $${msg:= $$default does not match}; \
|
||||||
|
${ECHO_MSG} "===> ${FULLPKGNAME${SUBPACKAGE}}${_MASTER} depends on: $$what -$$msg"; \
|
||||||
|
${REPORT_PROBLEM}; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
for abort in false false true; do \
|
for abort in false false true; do \
|
||||||
if $$abort; then \
|
if $$abort; then \
|
||||||
${ECHO_MSG} "Dependency check failed"; \
|
${ECHO_MSG} "Dependency check failed"; \
|
||||||
@ -1933,7 +1939,6 @@ ${WRKDIR}/.dep-${_i:C,>=,ge-,g:C,<=,le-,g:C,<,lt-,g:C,>,gt-,g:C,\*,ANY,g:C,[|:/=
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
found=false; \
|
found=false; \
|
||||||
what=$$pkg; \
|
|
||||||
if $$checkinstall; then \
|
if $$checkinstall; then \
|
||||||
$$early_exit || ${_force_update_fragment}; \
|
$$early_exit || ${_force_update_fragment}; \
|
||||||
if ${_PKG_QUERY} "$$pkg" -q; then \
|
if ${_PKG_QUERY} "$$pkg" -q; then \
|
||||||
@ -1953,16 +1958,7 @@ ${WRKDIR}/.dep-${_i:C,>=,ge-,g:C,<=,le-,g:C,<,lt-,g:C,>,gt-,g:C,\*,ANY,g:C,[|:/=
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
if $$early_exit; then \
|
if $$early_exit; then \
|
||||||
list=`eval $$toset exec ${MAKE} show=PKGNAMES`; \
|
break; \
|
||||||
if ${PKG_INFO} ${PKGDB_LOCK} -q -r "$$pkg" $$list; \
|
|
||||||
then \
|
|
||||||
break; \
|
|
||||||
else \
|
|
||||||
: $${msg:= not found}; \
|
|
||||||
${ECHO_MSG} "===> ${FULLPKGNAME${SUBPACKAGE}}${_MASTER} depends on: $$what -$$msg"; \
|
|
||||||
${REPORT_PROBLEM}; \
|
|
||||||
exit 1; \
|
|
||||||
fi; \
|
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
}
|
}
|
||||||
@ -2066,7 +2062,9 @@ ${WRKINST}/.saved_libs: ${_FAKE_COOKIE}
|
|||||||
|
|
||||||
port-lib-depends-check: ${WRKINST}/.saved_libs
|
port-lib-depends-check: ${WRKINST}/.saved_libs
|
||||||
. for _S in ${MULTI_PACKAGES}
|
. for _S in ${MULTI_PACKAGES}
|
||||||
@-SUBPACKAGE=${_S} ${MAKE} print-plist-with-depends lib_depends_args=all-lib-depends-args| \
|
@-SUBPACKAGE=${_S} ${MAKE} print-plist-with-depends \
|
||||||
|
lib_depends_args=all-lib-depends-args \
|
||||||
|
wantlib_args=fake-wantlib-args| \
|
||||||
${_CHECK_LIB_DEPENDS} -s ${WRKINST}/.saved_libs
|
${_CHECK_LIB_DEPENDS} -s ${WRKINST}/.saved_libs
|
||||||
. endfor
|
. endfor
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user