Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Mar 2003 00:32:45 +0300
From:      Sergey Matveychuk <sem@ciam.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/49017: 'make deinstall' doesn't deinstall old version of ports
Message-ID:  <E18rPSP-0000LV-00@sem-home.ciam.ru>

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

>Number:         49017
>Category:       ports
>Synopsis:       'make deinstall' doesn't deinstall old version of ports
>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:   Fri Mar 07 13:40:11 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 #1: Tue Mar 4 00:57:30 MSK 2003 root@sem-home.ciam.ru:/usr/src/sys/i386/compile/SEM-HOME i386


	
>Description:
	
	When user do 'make deinstall' he supposes port deinstalls.
	But if he's cvsuped before and has downloaded a new version of port
	he'll get messages that port don't installed. It's discourage him.
	
	We can fix it if port will be deinstalled by ORIGIN.
	Followed patch make it on 5.0 but absolutely harmless for 4.x.

	(See also PR/48646 when I used ORIGIN in check-already-installed target)
>How-To-Repeat:
	
>Fix:

	


--- bsd.port.mk.orig	Sun Mar  2 05:06:56 2003
+++ bsd.port.mk	Fri Mar  7 00:37:39 2003
@@ -3187,12 +3187,16 @@
 # Special target to remove installation
 
 .if !target(deinstall)
+deinstall_name!=${PKG_INFO} -q -O ${PKGORIGIN} 2> /dev/null || ${TRUE}
+.if ${deinstall_name} == ""
+deinstall_name=${PKGNAME}
+.endif
 deinstall:
-	@${ECHO_MSG} "===>  Deinstalling for ${PKGNAME}"
-	@if ${PKG_INFO} -e ${PKGNAME}; then \
-		${PKG_DELETE} -f ${PKGNAME}; \
+	@${ECHO_MSG} "===>  Deinstalling for ${PKGORIGIN} (${deinstall_name})"
+	@if ${PKG_INFO} -e ${deinstall_name}; then \
+		${PKG_DELETE} -f ${deinstall_name}; \
 	 else \
-		${ECHO_MSG} "===>   ${PKGNAME} not installed, skipping"; \
+		${ECHO_MSG} "===>   ${PKGORIGIN} not installed, skipping"; \
 	 fi
 	@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
 .endif
>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?E18rPSP-0000LV-00>