ports/170784: [bsd.port.mk] [patch] resolve symlinks in PREFIX on deinstall
Pietro Cerutti
gahr at FreeBSD.org
Mon Aug 20 13:50:07 UTC 2012
>Number: 170784
>Category: ports
>Synopsis: [bsd.port.mk] [patch] resolve symlinks in PREFIX on deinstall
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 20 13:50:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release:
>Organization:
The FreeBSD Project
>Environment:
>Description:
The deinstall target checks whether PREFIX equals the cwd registered at install time, but fails to resolve symlinks.
>How-To-Repeat:
mkdir -p /usr/tmp/prefix
ln -sf prefix /usr/tmp/link
sudo make -C /usr/ports/audio/etcd (whatever) install deinstall
===> Deinstalling for audio/etcd
===> etcd-1.0.1 has a different PREFIX: /usr/tmp/prefix, skipping
>Fix:
Patch attached with submission follows:
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk (revision 302796)
+++ Mk/bsd.port.mk (working copy)
@@ -4477,7 +4477,7 @@
check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
if [ "$${check_name}" = "${PKGBASE}" ]; then \
prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
- if [ "x${PREFIX}" = "x$${prfx}" ]; then \
+ if [ "x`${READLINK_CMD} -f ${PREFIX}`" = "x$${prfx}" ]; then \
${ECHO_MSG} "===> Deinstalling $${p}"; \
${PKG_DELETE} -f $${p}; \
else \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list