Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2003 23:56:13 +0300
From:      Sergey Matveychuk <sem@ciam.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        kris@obsecurity.org
Subject:   ports/48646: check-already-installed port by origin
Message-ID:  <E18nPe1-000CL9-00@sem-home.ciam.ru>

next in thread | raw e-mail | index | archive | help

>Number:         48646
>Category:       ports
>Synopsis:       check-already-installed port by origin
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 24 13:00:10 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 5.0-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD sem-home.ciam.ru 5.0-RELEASE-p2 FreeBSD 5.0-RELEASE-p2 #0: Mon Feb 24 22:03:00 MSK 2003 root@sem-home.ciam.ru:/usr/src/sys/i386/compile/SEM-HOME i386


	
>Description:
	
	pkg_add(1) checks already installed packages by origin.
	Why port install system don't do it? So we can install a few version
	of a port. It's bad. This small patch fix it.
>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.1_440	Mon Feb 17 02:23:01 2003
+++ bsd.port.mk	Mon Feb 24 23:36:08 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}`" != "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."; \
>Release-Note:
>Audit-Trail:
>Unformatted:

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?E18nPe1-000CL9-00>