ports/152102: [patch] Mk/bsd.port.mk: make dirrmtry more friendly
Andrej Zverev
az at FreeBSD.org
Wed Nov 10 10:40:14 UTC 2010
>Number: 152102
>Category: ports
>Synopsis: [patch] Mk/bsd.port.mk: make dirrmtry more friendly
>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: Wed Nov 10 10:40:13 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Andrej Zverev
>Release:
>Organization:
>Environment:
>Description:
We have several ports net/wired, games/inorm7, www/dalbum that contain
spaces in the directory structure (pkg-plist). To delete a file everything
works out of the box, but to delete the directory need to escape spaces.
This patch should solve the problem, but after using it to break down these
three ports, which is not difficult to fix.
Examples
Before:
@dirrmtry This is spaces - fail remove dir
@dirrmtry This\ is \space - will work
After:
@dirrmtry This is spaces - will work
@dirrmtry This\ is\ spaces - fail :-)
>How-To-Repeat:
>Fix:
--- bsd.port.mk.diff begins here ---
--- bsd.port.mk.orig 2010-11-10 12:49:50.000000000 +0300
+++ bsd.port.mk 2010-11-10 12:50:12.000000000 +0300
@@ -1630,7 +1630,7 @@
WWWDIR=${WWWDIR} ETCDIR=${ETCDIR}
PLIST_REINPLACE+= dirrmtry stopdaemon rmtry
-PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir %D/\1 2>/dev/null || true!
+PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir "%D/\1" 2>/dev/null || true!
PLIST_REINPLACE_RMTRY=s!^@rmtry \(.*\)!@unexec rm -f %D/\1 2>/dev/null || true!
PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1 forcestop 2>/dev/null || true!
--- bsd.port.mk.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list