| Summary: | 'make deinstall' doesn't deinstall old version of ports | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Sergey Matveychuk <sem> | ||||||
| Component: | Individual Port(s) | Assignee: | Port Management Team <portmgr> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | ||||||||
| Priority: | Normal | ||||||||
| Version: | Latest | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Sergey Matveychuk
2003-03-07 21:40:11 UTC
Lately Sergey Matveychuk told: > --- 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 it doesn't feel good to run pkg_info every time bsd.port.mk is used. how about: .if !target(deinstall) deinstall: @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} "===> ${PKGORIGIN} not installed, skipping"; \ fi @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} .endif -- /"\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News Agree. It looks much better. Thank you! ---- Sem. I'v tested it. Looks good. Here is it as patch for easy applying. ---- Sem. Shouldn't this be assigned to portmgr, not freebsd-ports-bugs? Responsible Changed From-To: freebsd-ports-bugs->portmgr Suggested that it is portmgr territory. State Changed From-To: open->analyzed Currently being tested on bento State Changed From-To: analyzed->closed Patch committed, thanks! |