summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2020-05-08 10:30:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-09 18:57:21 +0100
commit07083caab6f6456114341671744a11e5c0a3267a (patch)
treef3b50abe1a37a17048fd96c5d823940e61994a11 /meta/recipes-devtools/rpm
parenta073a3e2d3c9d3ee64ef9b64ee13f386123568d9 (diff)
downloadpoky-07083caab6f6456114341671744a11e5c0a3267a.tar.gz
rpm: fix file conflicts for MIPS64 N32
The following error occurred when prefer_color set to 2: Error: Transaction check error: file /sbin/ldconfig conflicts between attempted installs of ldconfig-2.31+git0+71f2b249a2-r0.mips64_n32 and lib32-ldconfig-2.31+git0+71f2b249a2-r0.mips32r2 file /usr/bin/gencat conflicts between attempted installs of lib32-libc6-utils-2.31+git0+71f2b249a2-r0.mips32r2 ... This was because: transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64) FColor = Current file color (001) & transaction_color (111) oFcolor = Previous file color (100) & transaction_color (111) when "neither preferred" happened, handled as conflicts. this is too restrictive for three way conflicts(mips64/mips64 n32/mips(32)). Fixed by perform a 'last-in-wins' resolution when "neither is preferred". refer: https://github.com/rpm-software-management/rpm/issues/193 https://git.openembedded.org/openembedded-core/commit/meta/recipes-devtools/rpm?id=36c225704daa58b98a4b7f2ef315eb944d8628b5 (From OE-Core rev: f94511fe5c163de8fb34d00ff3ba995437c3922c) Signed-off-by: Changqing Li <changqing.li@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/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch60
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.15.1.bb1
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
new file mode 100644
index 0000000000..6678c105cd
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
@@ -0,0 +1,60 @@
1From 1ed066fc6fa7d7afffe3545c4e3ea937529e6c49 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 7 May 2020 17:40:58 +0800
4Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
5
6This patch is from:
7https://github.com/rpm-software-management/rpm/issues/193
8
9Error: Transaction check error:
10 file /sbin/ldconfig conflicts between attempted installs of
11ldconfig-2.31+git0+71f2b249a2-r0.mips64_n32 and
12lib32-ldconfig-2.31+git0+71f2b249a2-r0.mips32r2
13...
14
15This was because:
16transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64)
17FColor = Current file color (001) & transaction_color (111)
18oFcolor = Previous file color (100) & transaction_color (111)
19
20In handleColorConflict, it only deal with conditons "new preferred" or
21"old preferred". But not deal with the situation where neither is the
22preferred type. so for tri-lib system, like mips64/mips64 n32/mips(32),
23"Transaction check error" occurred.
24
25Fixed by performing a 'last-in-wins' resolution when "neither is preferred".
26
27Upstream-Status: Submitted <https://github.com/rpm-software-management/rpm/issues/193>
28
29Signed-off-by: Changqing Li <changqing.li@windriver.com>
30---
31 lib/transaction.c | 13 ++++++++++++-
32 1 file changed, 12 insertions(+), 1 deletion(-)
33
34diff --git a/lib/transaction.c b/lib/transaction.c
35index 67b9db5..82386b8 100644
36--- a/lib/transaction.c
37+++ b/lib/transaction.c
38@@ -391,7 +391,18 @@ static int handleColorConflict(rpmts ts,
39 rpmfsSetAction(ofs, ofx, FA_CREATE);
40 rpmfsSetAction(fs, fx, FA_SKIPCOLOR);
41 rConflicts = 0;
42- }
43+ }else {
44+ /*
45+ * If neither is already skipped, we skip the old one, and
46+ * install the new one (last in wins).
47+ */
48+ if (ofs && !XFA_SKIPPING(rpmfsGetAction(ofs, ofx)) &&
49+ fs && !XFA_SKIPPING(rpmfsGetAction(fs, fx))) {
50+ rpmfsSetAction(ofs, ofx, FA_SKIPCOLOR);
51+ rpmfsSetAction(fs, fx, FA_CREATE);
52+ }
53+ rConflicts = 0;
54+ }
55 }
56 }
57
58--
592.7.4
60
diff --git a/meta/recipes-devtools/rpm/rpm_4.15.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
index 5c1190a3df..8add142461 100644
--- a/meta/recipes-devtools/rpm/rpm_4.15.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
39 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \ 39 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
40 file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \ 40 file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \
41 file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \ 41 file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
42 file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
42 " 43 "
43 44
44PE = "1" 45PE = "1"