summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoratatat <atatat@pkgsrc.org>2003-06-14 18:52:46 +0000
committeratatat <atatat@pkgsrc.org>2003-06-14 18:52:46 +0000
commite239c6dd3a073a1d8c32459cba7693d002a0d23d (patch)
tree40af90af7c4e42120df05bec97cd6a923a3e091d /mk
parent03953a3dd2c5380f64efc27a03842a36defba709 (diff)
downloadpkgsrc-e239c6dd3a073a1d8c32459cba7693d002a0d23d.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)