1*4882a593SmuzhiyunFrom 3bcb00e27ab09c433fdfecace0d48a6a7ed55ea8 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3*4882a593SmuzhiyunDate: Fri, 22 Apr 2016 23:14:32 +0200
4*4882a593SmuzhiyunSubject: [PATCH] Remove incorrect dependency from install-data-hook
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunHaving install-binPROGRAMS as a dependency of install-data-hook is not
7*4882a593Smuzhiyuncorrect, as it causes the installation of programs to be executed
8*4882a593Smuzhiyuntwice, and those two installations are racing with each other, causing
9*4882a593Smuzhiyunrandom installation failures.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunIn addition, this dependency is not needed: the install-data-hook
12*4882a593Smuzhiyuncalls the update-mime-database program in one of two ways:
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun - When cross-compiling, using the program pointed by
15*4882a593Smuzhiyun   UPDATE_MIME_DATABASE, which is already built, and is not installed
16*4882a593Smuzhiyun   by install-binPROGRAMS.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun - When compiling natively, suing the update-mime-database from the
19*4882a593Smuzhiyun   build directory, so there is no need to depend on
20*4882a593Smuzhiyun   install-binPROGRAMS.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunThis patch is similar to the patch used by the Yocto Project at
23*4882a593Smuzhiyunhttp://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch.
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
26*4882a593Smuzhiyun[Upstream status:
27*4882a593Smuzhiyunhttps://gitlab.freedesktop.org/xdg/shared-mime-info/merge_requests/18]
28*4882a593Smuzhiyun---
29*4882a593Smuzhiyun Makefile.am | 2 +-
30*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-)
31*4882a593Smuzhiyun
32*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am
33*4882a593Smuzhiyunindex 6fc4f73..c318dc3 100644
34*4882a593Smuzhiyun--- a/Makefile.am
35*4882a593Smuzhiyun+++ b/Makefile.am
36*4882a593Smuzhiyun@@ -52,7 +52,7 @@ else
37*4882a593Smuzhiyun   update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)"
38*4882a593Smuzhiyun endif
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun-install-data-hook: install-binPROGRAMS
41*4882a593Smuzhiyun+install-data-hook:
42*4882a593Smuzhiyun if ENABLE_UPDATE_MIMEDB
43*4882a593Smuzhiyun 	$(update_mime_database) -V "$(DESTDIR)$(datadir)/mime"
44*4882a593Smuzhiyun endif
45*4882a593Smuzhiyun--
46*4882a593Smuzhiyun2.6.4
47*4882a593Smuzhiyun
48