Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2013 01:38:34 GMT
From:      Javad Kouhi <javad.kouhi@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/178699: [fix] devel/xdg-utils fails without ${LOCALBASE}/share/desktop-directories
Message-ID:  <201305170138.r4H1cYoR064552@oldred.FreeBSD.org>
Resent-Message-ID: <201305170140.r4H1e0DV063984@freefall.freebsd.org>

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

>Number:         178699
>Category:       ports
>Synopsis:       [fix] devel/xdg-utils fails without ${LOCALBASE}/share/desktop-directories
>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:   Fri May 17 01:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Javad Kouhi
>Release:        9.1-STABLE
>Organization:
>Environment:
FreeBSD minootux 9.1-STABLE FreeBSD 9.1-STABLE #0 r249996: Sun Apr 28 03:10:00 IRDT 2013     root@minootux:/usr/obj/usr/src/sys/GIGABYTE  amd64
>Description:
If the "${LOCALBASE}/share/desktop-directories" directory does not exist in the system, the command "xdg-desktop-menu install .desktop-file" will fail.


>How-To-Repeat:
1. Install devel/xdg-utils
2. Make sure "${LOCALBASE}/share/desktop-directories" does not exist
3. Try installing a .desktop file with the "xdg-desktop-menu install" command
4. The above command will fail because that directory does not exist in the system
5. The following message will be printed:


xdg_user_dir: /root/.local/share/desktop-directories
xdg_global_dir: 
kde_user_dir: 
kde_global_dir: 
gnome_user_dir: 
gnome_global_dir: 
xdg-desktop-menu: No writable system menu directory found.


6. Create an empty "${LOCALBASE}/share/desktop-directories" and try again.
7. This time the .desktop file will be installed successfully.

>Fix:
Index: Makefile
===================================================================
--- Makefile	(revision 318348)
+++ Makefile	(working copy)
@@ -30,6 +30,7 @@
 		xdg-screensaver
 
 PLIST_FILES+=	${XDG_FILES:S|^|bin/|}
+PLIST_DIRS=	share/desktop-directories
 MAN1+=		${XDG_FILES:S|$|.1|}
 
 pre-patch:
@@ -39,4 +40,7 @@
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
 		${WRKSRC}/scripts/xdg-*
 
+post-install:
+	@${MKDIR} ${LOCALBASE}/share/desktop-directories
+
 .include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305170138.r4H1cYoR064552>