* [PATCH 0/2] rpm: Enable MIPS64 N32 transactions
@ 2015-12-02 13:32 Robert Yang
2015-12-02 13:32 ` [PATCH 1/2] rpm_5.4.14: " Robert Yang
2015-12-02 13:32 ` [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Robert Yang
0 siblings, 2 replies; 6+ messages in thread
From: Robert Yang @ 2015-12-02 13:32 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 687e5ef86361a16d6c411386939d4ba96a5909ea:
libsdl: remove redundant configure_tweak patch (2015-12-01 21:31:04 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/rpm
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/rpm
Mark Hatle (1):
rpm_5.4.14: Enable MIPS64 N32 transactions
Robert Yang (1):
rpm: fix file conflicts for MIPS64 N32
...ction.c-fix-file-conflicts-for-mips64-N32.patch | 43 ++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_5.4.14.bb | 4 ++
2 files changed, 47 insertions(+)
create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] rpm_5.4.14: Enable MIPS64 N32 transactions
2015-12-02 13:32 [PATCH 0/2] rpm: Enable MIPS64 N32 transactions Robert Yang
@ 2015-12-02 13:32 ` Robert Yang
2015-12-02 13:32 ` [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Robert Yang
1 sibling, 0 replies; 6+ messages in thread
From: Robert Yang @ 2015-12-02 13:32 UTC (permalink / raw)
To: openembedded-core
From: Mark Hatle <mark.hatle@windriver.com>
In a multilib install RPM will break a conflict using the transaction color.
However, by default MIPS64 N32 transactions are not enabled.
This change always enables them. This is effectively a no-op on non-MIPS
systems, and required if we need to support N32 on MIPS.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/recipes-devtools/rpm/rpm_5.4.14.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
index 8e1d3cb..b0e67c5 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
@@ -409,6 +409,9 @@ do_install_append() {
sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
+ # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
+ sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
+
# Enable Debian style arbitrary tags...
sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32
2015-12-02 13:32 [PATCH 0/2] rpm: Enable MIPS64 N32 transactions Robert Yang
2015-12-02 13:32 ` [PATCH 1/2] rpm_5.4.14: " Robert Yang
@ 2015-12-02 13:32 ` Robert Yang
2015-12-02 17:32 ` Mark Hatle
1 sibling, 1 reply; 6+ messages in thread
From: Robert Yang @ 2015-12-02 13:32 UTC (permalink / raw)
To: openembedded-core
Fixed:
1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
2) 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 when elf file is MIPS64 N32:
FColor = 0x100 & 111 = 100
Now 100 != 0 then error happened, the similar to oFColor. Check whether
FColor == 4 will fix the problem.
Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
installed).
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
...ction.c-fix-file-conflicts-for-mips64-N32.patch | 43 ++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_5.4.14.bb | 1 +
2 files changed, 44 insertions(+)
create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
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 0000000..150afcf
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
@@ -0,0 +1,43 @@
+From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 2 Dec 2015 00:56:07 -0800
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+Fixed:
+1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
+2) 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 when elf file is MIPS64 N32:
+FColor = 0x100 & 111 = 100
+Now 100 != 0 then error happened, the similar to oFColor. Check whether
+FColor == 4 will fix the problem.
+
+Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
+installed).
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/transaction.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index fa60006..c4d84bb 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -420,7 +420,8 @@ assert(otherFi != NULL);
+ fi->actions[i] = FA_SKIPCOLOR;
+ rConflicts = 0;
+ } else
+- if (FColor == 0 && oFColor == 0) {
++ /* ... 4 is for MIPS64 N32, and prefcolor != 4 goes here. ... */
++ if ((FColor == 0 && oFColor == 0) || FColor == 4 || oFColor == 4) {
+ /* ... otherwise, do both, last in wins. */
+ otherFi->actions[otherFileNum] = FA_CREATE;
+ fi->actions[i] = FA_CREATE;
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
index b0e67c5..56f36bf 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
file://configure.ac-check-for-both-gpg2-and-gpg.patch \
file://0001-define-EM_AARCH64.patch \
file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
+ file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
"
# Uncomment the following line to enable platform score debugging
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32
2015-12-02 13:32 ` [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Robert Yang
@ 2015-12-02 17:32 ` Mark Hatle
0 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2015-12-02 17:32 UTC (permalink / raw)
To: Robert Yang, openembedded-core
FYI, expect a 'v2' version of this. We found some further issues.
The previous patch 1/2 is correct and won't change.
--Mark
On 12/2/15 7:32 AM, Robert Yang wrote:
> Fixed:
> 1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
> 2) 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 when elf file is MIPS64 N32:
> FColor = 0x100 & 111 = 100
> Now 100 != 0 then error happened, the similar to oFColor. Check whether
> FColor == 4 will fix the problem.
>
> Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
> installed).
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> ...ction.c-fix-file-conflicts-for-mips64-N32.patch | 43 ++++++++++++++++++++
> meta/recipes-devtools/rpm/rpm_5.4.14.bb | 1 +
> 2 files changed, 44 insertions(+)
> create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
>
> 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 0000000..150afcf
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
> @@ -0,0 +1,43 @@
> +From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
> +From: Robert Yang <liezhi.yang@windriver.com>
> +Date: Wed, 2 Dec 2015 00:56:07 -0800
> +Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
> +
> +Fixed:
> +1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
> +2) 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 when elf file is MIPS64 N32:
> +FColor = 0x100 & 111 = 100
> +Now 100 != 0 then error happened, the similar to oFColor. Check whether
> +FColor == 4 will fix the problem.
> +
> +Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
> +installed).
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> +---
> + lib/transaction.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/lib/transaction.c b/lib/transaction.c
> +index fa60006..c4d84bb 100644
> +--- a/lib/transaction.c
> ++++ b/lib/transaction.c
> +@@ -420,7 +420,8 @@ assert(otherFi != NULL);
> + fi->actions[i] = FA_SKIPCOLOR;
> + rConflicts = 0;
> + } else
> +- if (FColor == 0 && oFColor == 0) {
> ++ /* ... 4 is for MIPS64 N32, and prefcolor != 4 goes here. ... */
> ++ if ((FColor == 0 && oFColor == 0) || FColor == 4 || oFColor == 4) {
> + /* ... otherwise, do both, last in wins. */
> + otherFi->actions[otherFileNum] = FA_CREATE;
> + fi->actions[i] = FA_CREATE;
> +--
> +1.7.9.5
> +
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
> index b0e67c5..56f36bf 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
> file://configure.ac-check-for-both-gpg2-and-gpg.patch \
> file://0001-define-EM_AARCH64.patch \
> file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
> + file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
> "
>
> # Uncomment the following line to enable platform score debugging
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32
2020-05-08 2:30 [V2][PATCH 0/2] update default rpm prefer_color Changqing Li
@ 2020-05-08 2:30 ` Changqing Li
0 siblings, 0 replies; 6+ messages in thread
From: Changqing Li @ 2020-05-08 2:30 UTC (permalink / raw)
To: openembedded-core
From: Changqing Li <changqing.li@windriver.com>
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
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
...ction.c-fix-file-conflicts-for-MIPS64-N32.patch | 58 ++++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 1 +
2 files changed, 59 insertions(+)
create mode 100644 meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
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 0000000..b515075
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
@@ -0,0 +1,58 @@
+From 1ed066fc6fa7d7afffe3545c4e3ea937529e6c49 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 7 May 2020 17:40:58 +0800
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+This patch is from:
+https://github.com/rpm-software-management/rpm/issues/193
+
+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
+...
+
+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)
+
+In handleColorConflict, it only deal with conditons "new preferred" or
+"old preferred". But not deal with the situation where neither is the
+preferred type. so for tri-lib system, like mips64/mips64 n32/mips(32),
+"Transaction check error" occurred.
+
+Fixed by performing a 'last-in-wins' resolution when "neither is preferred".
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/transaction.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index 67b9db5..82386b8 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -391,7 +391,18 @@ static int handleColorConflict(rpmts ts,
+ rpmfsSetAction(ofs, ofx, FA_CREATE);
+ rpmfsSetAction(fs, fx, FA_SKIPCOLOR);
+ rConflicts = 0;
+- }
++ }else {
++ /*
++ * If neither is already skipped, we skip the old one, and
++ * install the new one (last in wins).
++ */
++ if (ofs && !XFA_SKIPPING(rpmfsGetAction(ofs, ofx)) &&
++ fs && !XFA_SKIPPING(rpmfsGetAction(fs, fx))) {
++ rpmfsSetAction(ofs, ofx, FA_SKIPCOLOR);
++ rpmfsSetAction(fs, fx, FA_CREATE);
++ }
++ rConflicts = 0;
++ }
+ }
+ }
+
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
index 17255dc..3e2c6d1 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
@@ -44,6 +44,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
file://0001-Rip-out-partial-support-for-unused-MD2-and-RIPEMD160.patch \
file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \
+ file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
"
PE = "1"
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32
2020-05-09 7:01 [V3][PATCH 0/2] update default prefer_color to 2 Changqing Li
@ 2020-05-09 7:01 ` Changqing Li
0 siblings, 0 replies; 6+ messages in thread
From: Changqing Li @ 2020-05-09 7:01 UTC (permalink / raw)
To: openembedded-core, alex.kanavin
From: Changqing Li <changqing.li@windriver.com>
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
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
....c-fix-file-conflicts-for-MIPS64-N32.patch | 61 +++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.15.1.bb | 1 +
2 files changed, 62 insertions(+)
create mode 100644 meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
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..c356086998
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch
@@ -0,0 +1,61 @@
+From 301af100ecda948115dcc47b7e2d09565901b291 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Sat, 9 May 2020 06:18:13 +0000
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+This patch is from:
+https://github.com/rpm-software-management/rpm/issues/193
+
+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
+...
+
+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)
+
+In handleColorConflict, it only deal with conditons "new preferred" or
+"old preferred". But not deal with the situation where neither is the
+preferred type. so for tri-lib system, like mips64/mips64 n32/mips(32),
+"Transaction check error" occurred.
+
+Fixed by performing a 'last-in-wins' resolution when "neither is
+preferred".
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/transaction.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index e51cff25a..ca7944a43 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -389,7 +389,18 @@ static int handleColorConflict(rpmts ts,
+ rpmfsSetAction(ofs, ofx, FA_CREATE);
+ rpmfsSetAction(fs, fx, FA_SKIPCOLOR);
+ rConflicts = 0;
+- }
++ } else {
++ /*
++ * If neither is already skipped, we skip the old one, and
++ * install the new one (last in wins).
++ */
++ if (ofs && !XFA_SKIPPING(rpmfsGetAction(ofs, ofx)) &&
++ fs && !XFA_SKIPPING(rpmfsGetAction(fs, fx))) {
++ rpmfsSetAction(ofs, ofx, FA_SKIPCOLOR);
++ rpmfsSetAction(fs, fx, FA_CREATE);
++ }
++ rConflicts = 0;
++ }
+ }
+ }
+
+--
+2.24.1
+
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 \
file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
file://0001-rpmplugins.c-call-dlerror-prior-to-dlsym.patch \
file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
+ file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
"
PE = "1"
--
2.24.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-09 7:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 13:32 [PATCH 0/2] rpm: Enable MIPS64 N32 transactions Robert Yang
2015-12-02 13:32 ` [PATCH 1/2] rpm_5.4.14: " Robert Yang
2015-12-02 13:32 ` [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Robert Yang
2015-12-02 17:32 ` Mark Hatle
-- strict thread matches above, loose matches on Subject: below --
2020-05-08 2:30 [V2][PATCH 0/2] update default rpm prefer_color Changqing Li
2020-05-08 2:30 ` [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Changqing Li
2020-05-09 7:01 [V3][PATCH 0/2] update default prefer_color to 2 Changqing Li
2020-05-09 7:01 ` [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Changqing Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.