Patchwork [4/6] shared-mime-info: fix build race condition

login
register
mail settings
Submitter Mark Hatle
Date June 6, 2012, 2:53 p.m.
Message ID <f33daa49ebd9193dd5689490ca3cbad3803082c5.1338994308.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/29299/
State Accepted
Commit 6fef8f73143fdeed6da15444c11bce9a8b35668b
Headers show

Comments

Mark Hatle - June 6, 2012, 2:53 p.m.
From: Joe Slater <jslater@windriver.com>

The definition of install-data-hook in Makefile.am leads
to multiple, overlapping, executions of the install-binPROGRAMS
target.  We modify the definition to avoid that.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 .../shared-mime-info/install-data-hook.patch       |   21 ++++++++++++++++++++
 .../shared-mime-info/shared-mime-info_0.91.bb      |    5 ++-
 2 files changed, 24 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
Colin Walters - June 7, 2012, 1:26 a.m.
On Wed, 2012-06-06 at 09:53 -0500, Mark Hatle wrote:
> From: Joe Slater <jslater@windriver.com>
> 
> The definition of install-data-hook in Makefile.am leads
> to multiple, overlapping, executions of the install-binPROGRAMS
> target.  We modify the definition to avoid that.

See also https://bugs.freedesktop.org/show_bug.cgi?id=46093

Patch

diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
new file mode 100644
index 0000000..4c075f2
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -0,0 +1,21 @@ 
+fix shared-mime-info build race condition
+
+The definition of install-data-hook in Makefile.am leads
+to multiple, overlapping, executions of install-binPROGRAMS
+target.  We modify the definition to avoid that.
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -44,7 +44,9 @@ $(pkgconfig_DATA): config.status
+ @INTLTOOL_XML_RULE@
+ @INTLTOOL_DESKTOP_RULE@
+ 
+-install-data-hook: install-binPROGRAMS
++# do NOT make this dependent on anything!
++#
++install-data-hook:
+ if ENABLE_UPDATE_MIMEDB
+ 	$(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
+ endif
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
index 7ae6e10..910cb7f 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
@@ -1,7 +1,8 @@ 
 require shared-mime-info.inc
-PR = "r3"
+PR = "r4"
 
 SRC_URI[md5sum] = "982a211560ba4c47dc791ccff34e8fbc"
 SRC_URI[sha256sum] = "98cfebe1d809afb24934e634373821e2a1dfa86fc6462cab230589a1c80988bd"
 
-SRC_URI =+ "file://parallelmake.patch"
+SRC_URI =+ "file://parallelmake.patch \
+	    file://install-data-hook.patch"