diff options
author | wiz <wiz@pkgsrc.org> | 2000-04-19 15:02:31 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2000-04-19 15:02:31 +0000 |
commit | fd683ab63c5500006f363def5ba8b8cb1aa32aa9 (patch) | |
tree | 6fe48808a8495bfb273c70c7c45ac2652552a6fd /mk | |
parent | 0630b58a794f0efe1a1fe51877a820ba0bf59bcc (diff) | |
download | pkgsrc-fd683ab63c5500006f363def5ba8b8cb1aa32aa9.tar.gz |
make show-downlevel compare version numbers if a different version is
installed, instead of just saying that the version installed is older.
Useful e.g. for the -current packages which don't have -current in their
name (gimp, mutt, cvs et al.)
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 6987c92d00b..29794d0acff 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -i $NetBSD: bsd.pkg.mk,v 1.424 2000/04/15 16:13:07 hubertf Exp $ +i $NetBSD: bsd.pkg.mk,v 1.425 2000/04/19 15:02:31 wiz Exp $ # # This file is in the public domain. # @@ -1112,9 +1112,10 @@ show-downlevel: ${_PKG_SILENT}${_PKG_DEBUG}${DO_NADA} .else ${_PKG_SILENT}${_PKG_DEBUG} \ - base=`${ECHO} ${PKGNAME} | ${SED} -e 's|\(.*\)-.*|\1|'`; \ - found=`${PKG_INFO} -e "$$base-[0-9]*" || ${TRUE}`; \ + base=`${ECHO} ${PKGNAME} | ${SED} -e 's/-\([^-]*\)$$/<\1/'`; \ + found=`${PKG_INFO} -e "$$base" || ${TRUE}`; \ if [ "X$$found" != "X" -a "X$$found" != "X${PKGNAME}" ]; then \ + base=`${ECHO} $$base | ${SED} -e 's/<[^<]*$$//'`; \ ${ECHO} "$$base package: $$found installed, pkgsrc version ${PKGNAME}"; \ fi .endif |