summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-09-29 19:19:16 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-02 11:40:49 +0100
commita2e7adad277cb8f71febaccf734a1df727d2ce8a (patch)
treef0f674db852b9b119a967c4b9aefbc306fec4d91 /meta/recipes-devtools/rpm
parentfc3b6656afdabfa50bcbd4028cc3d2a9881c551f (diff)
downloadpoky-a2e7adad277cb8f71febaccf734a1df727d2ce8a.tar.gz
rpm: Fix file contention issue
There is an issue that is caused when doing the install step of rpm on systems with high parallelization where two jobs of make will fight for the same file while installing the sub-directory lua. This is caused by the same makefile rule being called twice in a way that both could be trying to install at the same time. This fix renames the linking rule so it will always be run after the needed files are added and removed it's dependency so the required rule would only run once. This was tested heavily using ppss to run mutliple installs in parallel. This wouldn't happen in practise but it was tested will all the individual rules as well. (From OE-Core rev: d05c5da6b972db97d3eb66b659f5641368c9ebe4) Signed-off-by: Morgan Little <morgan.little@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch31
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb3
2 files changed, 33 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
new file mode 100644
index 0000000000..12f85b7fc9
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
@@ -0,0 +1,31 @@
1rpm: Resolve parallel install issue when installing lua
2
3When lua is being installed on some systems that are being run with high levels
4of parallelization there are cases where install-data-am and install-exec-hook
5are processed at the same or a very short time apart. This causes
6install-pkgbinPROGRAMS, which is a dependency of both, to be run at around the
7same time This sometimes causes file contention and will sometimes be in a state
8where install-exec-hook is looking for a file that is being installed or both
9install-pkgbinPROGRAMS being run are installing the same file and fail because
10it cannon create a new file.
11
12This patch allows install-exec-hook to be called by install-data-am instead of
13install-exec-am. It also removed the dependency in install-data-hook on
14install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run once
15so there whould be any file contention.
16
17Upstream-Status: Pending
18
19Signed-off-by: Morgan Little <morgan.little@windriver.com>
20
21--- a/lua/Makefile.am.orig
22+++ b/lua/Makefile.am
23@@ -320,7 +320,7 @@
24 # XXX Build & install as rpmlua/rpmluac with hardlinks to lua/luac post install.
25 # XXX CVS has lua/luac sub-directories in the Attic that collide with the
26 # XXX lua/luac executable names when using cvs update.
27-install-exec-hook: install-pkgbinPROGRAMS
28+install-data-hook:
29 mkdir -p $(DESTDIR)$(pkgbindir)
30 $(__RM) -f $(DESTDIR)$(pkgbindir)/lua
31 $(__LN) $(DESTDIR)$(pkgbindir)/rpmlua $(DESTDIR)$(pkgbindir)/lua
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 2a4c8d831c..41943652b0 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44 44
45DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native" 45DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
46PR = "r49" 46PR = "r50"
47 47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract... 49# in order to extract the distribution SRPM into a format we can extract...
@@ -77,6 +77,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
77 file://fstack-protector-configure-check.patch \ 77 file://fstack-protector-configure-check.patch \
78 file://dbconvert.patch \ 78 file://dbconvert.patch \
79 file://rpm-uuid-include.patch \ 79 file://rpm-uuid-include.patch \
80 file://makefile-am-exec-hook.patch \
80 " 81 "
81 82
82SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" 83SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"