summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoratatat <atatat>2003-06-14 18:52:46 +0000
committeratatat <atatat>2003-06-14 18:52:46 +0000
commit59715f8b769f50a0daceeac1b71c17a7d29c1f26 (patch)
tree40af90af7c4e42120df05bec97cd6a923a3e091d /mk
parent8ceef007e9a5a91de606aa8a8c3c64a504a6d558 (diff)
downloadpkgsrc-59715f8b769f50a0daceeac1b71c17a7d29c1f26.tar.gz
Add a ``show-needs-update'' target that checks each dependency to see
if it's up to date. For dependencies (including the current package) that are not up to date (or are not installed), a one line note is printed thusly: % cd audio/xmradio/ % make show-needs-update audio/mad => mad-0.14.2b => needs update to mad-0.14.2bnb1 audio/xmradio => (none) => needs install of xmradio-1.2
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk19
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index f8ddba8d1fe..bd097afa2fd 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1197 2003/06/14 16:53:00 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1198 2003/06/14 18:52:46 atatat Exp $
#
# This file is in the public domain.
#
@@ -1644,6 +1644,23 @@ show-installed-depends:
. endif
.endif
+.if !target(show-needs-update)
+show-needs-update:
+. if defined(DEPENDS)
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ for i in `${MAKE} show-all-depends-dirs`; do \
+ cd ${_PKGSRCDIR}/$$i; \
+ want=`make show-vars VARNAMES=PKGNAME`; \
+ have=`${PKG_INFO} -e "$${want%-*}" || true`; \
+ if [ -z "$$have" ]; then \
+ echo "$$i => (none) => needs install of $$want"; \
+ elif [ "$$have" != "$$want" ]; then \
+ echo "$$i => $$have => needs update to $$want"; \
+ fi; \
+ done
+. endif
+.endif
+
.if !target(show-pkgsrc-dir)
show-pkgsrc-dir:
. if defined(PKG_FAIL_REASON)