diff options
author | hubertf <hubertf@pkgsrc.org> | 2000-01-10 19:43:37 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 2000-01-10 19:43:37 +0000 |
commit | 922d8f63e0f3b524349a550ece96d59484cdc725 (patch) | |
tree | c3e21f79fe0c9de8c5dfc6e4dde79b2a4cfd51fd /mk | |
parent | 7b45a0cbffe7d9c47035a97b9abf996bdb3cab23 (diff) | |
download | pkgsrc-922d8f63e0f3b524349a550ece96d59484cdc725.tar.gz |
When checking and registerring dependencies, recognize dependencies that
match more than one package, and warn about it:
*** WARNING: Dependency on 'gnome-*' expands to several installed packages
( gnome-libs-1.0.53 gnome-core-1.0.53 gnome-print-0.9 ).
Please check if this is really intended!
In such a case, the pattern ('gnome-*') should be tightened to only match
what's really intended (e.g. 'gnome-[0-9]*').
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index fee1f8d9874..130f85bb51d 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.386 2000/01/10 19:17:27 hubertf Exp $ +# $NetBSD: bsd.pkg.mk,v 1.387 2000/01/10 19:43:37 hubertf Exp $ # # This file is in the public domain. # @@ -2180,7 +2180,13 @@ misc-depends: uptodate-pkgtools dir="`${ECHO} \"${dep}\" | ${SED} -e s/.\*://`"; \ found="`${PKG_INFO} -e \"$$package\" || ${TRUE}`"; \ if [ X"$$found" != X"" ]; then \ - ${ECHO_MSG} "===> ${PKGNAME} depends on installed package: $$package - `${ECHO} $$found | ${SED} -e 's|${PKG_DBDIR}/||g' | tr '\012' '\040'`found"; \ + if [ `${ECHO} $$found | wc -w` -gt 1 ]; then \ + ${ECHO} '***' "WARNING: Dependency on '$$package' expands to several installed packages " ; \ + ${ECHO} " (" `${ECHO} $$found` ")." ; \ + ${ECHO} " Please check if this is really intended!" ; \ + else \ + ${ECHO_MSG} "===> ${PKGNAME} depends on installed package: $$package - `${ECHO} $$found | ${SED} -e 's|${PKG_DBDIR}/||g' | tr '\012' '\040'`found"; \ + fi ; \ else \ ${ECHO_MSG} "===> ${PKGNAME} depends on package: $$package"; \ target=${DEPENDS_TARGET}; \ @@ -2574,7 +2580,12 @@ fake-pkg: ${PLIST} ${DESCR} fi; \ for dep in `${MAKE} package-depends PACKAGE_DEPENDS_WITH_PATTERNS=true ECHO_MSG=${TRUE} | sort -u`; do \ realdep="`${PKG_INFO} -e \"$$dep\" || ${TRUE}`" ; \ - ${ECHO} "a sanity check should be put in here to prevent some user having the pkg installed/registered twice somehow - HF" >/dev/null ; \ + if [ `${ECHO} $$realdep | wc -w` -gt 1 ]; then \ + ${ECHO} '***' "WARNING: '$$dep' expands to several installed packages " ; \ + ${ECHO} " (" `${ECHO} $$realdep` ")." ; \ + ${ECHO} " Please check if this is really intended!" ; \ + continue ; \ + fi ; \ if ${TEST} -z "$$realdep"; then \ ${ECHO} "$$dep not installed - NOT registered" ; \ elif [ -d ${PKG_DBDIR}/$$realdep ]; then \ |