Re: ports/49017: 'make deinstall' doesn't deinstall old version of ports

[ Available lists | Index of freebsd-ports-bugs | Month of Mar 2003 | Week of 15 Mar 2003 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Sergey Matveychuk <sem@ciam.ru>
Date
15 Mar 2003 15:20:09
Subject
Re: ports/49017: 'make deinstall' doesn't deinstall old version of ports
Message-ID
200303152320.h2FNK6IA046374@freefall.freebsd.org


[ Hide this part ]
The following reply was made to PR ports/49017; 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/49017: 'make deinstall' doesn't deinstall old version of
ports
Date: Sun, 16 Mar 2003 02:14:23 +0300

This is a multi-part message in MIME format.
--------------020103030306010604060005
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I'v tested it. Looks good.
Here is it as patch for easy applying.

----
Sem.

--------------020103030306010604060005
Content-Type: text/plain;
name="deinstall_origin.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="deinstall_origin.patch"

--- bsd.port.mk.1.442 Sun Mar 16 00:33:00 2003
+++ bsd.port.mk Sun Mar 16 02:01:42 2003
@@ -3186,11 +3186,13 @@

.if !target(deinstall)
deinstall:
- @${ECHO_MSG} "===> Deinstalling for ${PKGNAME}"
- @if ${PKG_INFO} -e ${PKGNAME}; then \
- ${PKG_DELETE} -f ${PKGNAME}; \
+ @deinstall_name=`${PKG_INFO} -q -O ${PKGORIGIN} 2> /dev/null`; \
+ ${TEST} -z $${deinstall_name} && deinstall_name=${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

--------------020103030306010604060005--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message



Elapsed time: 0.055 seconds