Date: Wed, 26 Feb 2003 04:30:03 -0800 (PST) From: Sergey Matveychuk <sem@ciam.ru> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/48646: check-already-installed port by origin Message-ID: <200302261230.h1QCU36t059774@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/48646; it has been noted by GNATS. From: Sergey Matveychuk <sem@ciam.ru> To: freebsd-gnats-submit@FreeBSD.org, sem@ciam.ru Cc: Subject: Re: ports/48646: check-already-installed port by origin Date: Wed, 26 Feb 2003 15:28:33 +0300 This is a multi-part message in MIME format. --------------040409060505030307060009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I'v found out pkg_info doesn't support -O switch in 4.x. Here is a new patch. (Just ignore stderr). --------------040409060505030307060009 Content-Type: text/plain; name="check-origin.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="check-origin.patch" --- bsd.port.mk.1_440 Mon Feb 17 02:23:01 2003 +++ bsd.port.mk Wed Feb 26 15:20:01 2003 @@ -2718,7 +2726,8 @@ .if !target(check-already-installed) check-already-installed: .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) - @if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \ + @if [ -d ${PKG_DBDIR}/${PKGNAME} -o \ + "x`${PKG_INFO} -q -O ${PKGORIGIN} 2> /dev/null`" != "x" ]; then \ ${ECHO_CMD} "===> ${PKGNAME} is already installed - perhaps an older version?"; \ ${ECHO_CMD} " If so, you may wish to \`\`make deinstall'' and install"; \ ${ECHO_CMD} " this port again by \`\`make reinstall'' to upgrade it properly."; \ --------------040409060505030307060009-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302261230.h1QCU36t059774>