summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc>1999-07-02 12:54:28 +0000
committeragc <agc>1999-07-02 12:54:28 +0000
commitf3159b4d9d7e1fa2bbd680b5c58bae8bb3e58ae3 (patch)
tree549e8ada35fbba0c2113821cc1ef55ea2712530f /mk
parent0b81eff53f25d034e9ace52fc4dedb5c50dfb13d (diff)
downloadpkgsrc-f3159b4d9d7e1fa2bbd680b5c58bae8bb3e58ae3.tar.gz
Add a show-downlevel target, which shows output of the form:
sudo package: sudo-1.5.7p4 installed, pkgsrc version sudo-1.5.9p1 for installed packages whose version does not match that in pkgsrc. No output is produced if the package is not installed. This allows an easy overview of the packages installed on a machine which need to be upgraded.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 66910c5e0a4..a27f9225f64 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.289 1999/07/02 08:37:26 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.290 1999/07/02 12:54:28 agc Exp $
#
# This file is in the public domain.
#
@@ -907,6 +907,20 @@ show-distfiles:
.endif
.endif
+.if !target(show-downlevel)
+show-downlevel:
+.if defined(IGNORE)
+ ${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA}
+.else
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ base=`${ECHO} ${PKGNAME} | ${SED} -e 's|\(.*\)-.*|\1|'`; \
+ found=`${PKG_INFO} -e "$$base-*" || ${TRUE}`; \
+ if [ "X$$found" != "X" -a "X$$found" != "X${PKGNAME}" ]; then \
+ ${ECHO} "$$base package: $$found installed, pkgsrc version ${PKGNAME}"; \
+ fi
+.endif
+.endif
+
# Extract