freedesktop/desktop-file-utils: update-desktop-database problem



Attached is a patched Makefile that resolves the update-desktop-database
problem.

The problem
-----------
The command

	update-desktop-database 

updates the cache file of each entry found in

	XDG_DATA_DIRS

The user running the command must have write permission in each datadir
associated with each entry in XDG_DATA_DIRS.  If not, the command will
fail.


The solution
------------
(1) Restrict XDG_DATA_DIRS to 

	$garnome/share

while running the command from the GAR Makefile.

(2) add and "exit" to handle the case where the command fails
so "make paranoid-install" will stop if something "bad" happens.


-Joseph
-- 
joseph_sacco [at] comcast [dot] net

GARNAME = desktop-file-utils
GARVERSION = 0.10
CATEGORIES = freedesktop
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz

MASTER_SITES = http://freedesktop.org/software/desktop-file-utils/releases/

LIBDEPS = platform/glib platform/intltool desktop/gnome-menus

DESCRIPTION = desktop-file-utils
define BLURB
 #FIXME: blurb goes here
endef

CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS = $(WORKSRC)/Makefile
INSTALL_SCRIPTS = $(WORKSRC)/Makefile

CONFIGURE_ARGS = $(DIRPATHS)

include ../category.mk

post-install:
	@echo " ==> Updating Desktop Database..."
	@XDG_DATA_DIRS=$(datadir) $(bindir)/update-desktop-database || exit
	@$(MAKECOOKIE)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]