allow detection of older package versions with a new package from the ports tree

This commit is contained in:
todd 1998-07-12 04:34:39 +00:00
parent f956b84e11
commit ce001ee9c2

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
# $OpenBSD: bsd.port.mk,v 1.35 1998/07/09 03:12:18 marc Exp $
# $OpenBSD: bsd.port.mk,v 1.36 1998/07/12 04:34:39 todd Exp $
# $NetBSD: $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
@ -1228,7 +1228,7 @@ _PORT_USE: .USE
.endif
.if make(real-install)
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
@if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
@if [ -d ${PKG_DBDIR}/${PKGNAME} -o "X$$(ls -d ${PKG_DBDIR}/${PKGNAME:C/-.*//g}-*> 2> /dev/null)" != "X" ]; then \
${ECHO_MSG} "===> ${PKGNAME} is already installed - perhaps an older version?"; \
${ECHO_MSG} " If so, you may wish to \`\`pkg_delete ${PKGNAME}'' and install"; \
${ECHO_MSG} " this port again by \`\`make reinstall'' to upgrade it properly."; \