Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2010 13:38:57 +0300
From:      Andrej Zverev <az@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/152102: [patch] Mk/bsd.port.mk: make dirrmtry more friendly
Message-ID:  <E1PG84v-0004M0-Mr@sunner.semmy.ru>
Resent-Message-ID: <201011101040.oAAAeDwj013263@freefall.freebsd.org>

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

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1PG84v-0004M0-Mr>