diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-12-02 03:39:27 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-12 23:42:53 +0000 |
commit | bc26a7d34cf1705e1a2acac561259ee1610d7da2 (patch) | |
tree | c06662a64155839288b03d6c2d787e78d0361426 /meta/recipes-devtools | |
parent | 01c0285677b4b831bcb9c796337f7e888f1d76ec (diff) | |
download | poky-bc26a7d34cf1705e1a2acac561259ee1610d7da2.tar.gz |
rpm: fix file conflicts for MIPS64 N32
The following error can occur:
smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
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)
There are two places where the conflict comparisons occur. In both places
the 'else' clause was too restrictive (opposite of the 'positive' clause).
This caused the system to only permit a binary comparison - "new preferred" or
"old preferred". It did not permissing "neither preferred". By removing the
else comparison the system will now perform a 'last-in-wins' resolution when
"neither is preferred".
Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
installed).
(From OE-Core rev: 36c225704daa58b98a4b7f2ef315eb944d8628b5)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch | 52 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.14.bb | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch new file mode 100644 index 0000000000..ed5d8a7dac --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 2 Dec 2015 00:56:07 -0800 | ||
4 | Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32 | ||
5 | |||
6 | The following error can occur: | ||
7 | smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3 | ||
8 | error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32 | ||
9 | error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32 | ||
10 | |||
11 | This was because: | ||
12 | transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64) | ||
13 | FColor = Current file color (001) & transaction_color (111) | ||
14 | oFcolor = Previous file color (100) & transaction_color (111) | ||
15 | |||
16 | There are two places where the conflict comparisons occur. In both places | ||
17 | the 'else' clause was too restrictive (opposite of the 'positive' clause). | ||
18 | This caused the system to only permit a binary comparison - "new preferred" or | ||
19 | "old preferred". It did not permissing "neither preferred". By removing the | ||
20 | else comparison the system will now perform a 'last-in-wins' resolution when | ||
21 | "neither is preferred". | ||
22 | |||
23 | Upstream-Status: Pending | ||
24 | |||
25 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
26 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
27 | --- | ||
28 | lib/transaction.c | 3 ++- | ||
29 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
30 | |||
31 | Index: rpm-5.4.14/lib/transaction.c | ||
32 | =================================================================== | ||
33 | --- rpm-5.4.14.orig/lib/transaction.c | ||
34 | +++ rpm-5.4.14/lib/transaction.c | ||
35 | @@ -154,7 +154,7 @@ static int handleInstInstalledFile(const | ||
36 | fi->actions[fx] = FA_SKIPCOLOR; | ||
37 | #endif | ||
38 | rConflicts = 0; | ||
39 | - } else if (FColor & prefcolor) { | ||
40 | + } else { | ||
41 | #ifdef REFERENCE | ||
42 | rpmfsSetAction(fs, fx, FA_CREATE); | ||
43 | #else | ||
44 | @@ -420,7 +420,7 @@ assert(otherFi != NULL); | ||
45 | fi->actions[i] = FA_SKIPCOLOR; | ||
46 | rConflicts = 0; | ||
47 | } else | ||
48 | - if (FColor == 0 && oFColor == 0) { | ||
49 | + { | ||
50 | /* ... otherwise, do both, last in wins. */ | ||
51 | otherFi->actions[otherFileNum] = FA_CREATE; | ||
52 | fi->actions[i] = FA_CREATE; | ||
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb index 58a0934f0d..97651d28af 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb | |||
@@ -102,6 +102,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e | |||
102 | file://configure.ac-check-for-both-gpg2-and-gpg.patch \ | 102 | file://configure.ac-check-for-both-gpg2-and-gpg.patch \ |
103 | file://0001-define-EM_AARCH64.patch \ | 103 | file://0001-define-EM_AARCH64.patch \ |
104 | file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \ | 104 | file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \ |
105 | file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \ | ||
105 | " | 106 | " |
106 | 107 | ||
107 | # Uncomment the following line to enable platform score debugging | 108 | # Uncomment the following line to enable platform score debugging |