Openembedded Core Discussions
 help / color / mirror / Atom feed
* [v2 PATCH 0/2] rpm: Enable MIPS64 N32 transactions
@ 2015-12-02 21:30 Mark Hatle
  2015-12-02 21:30 ` [PATCH 1/2] rpm_5.4.14: " Mark Hatle
  2015-12-02 21:30 ` [v2 PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Mark Hatle
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Hatle @ 2015-12-02 21:30 UTC (permalink / raw)
  To: openembedded-core

patch 1/2 is the same.  patch 2/2 was revised.

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 | 52 ++++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.14.bb            |  4 ++
 2 files changed, 56 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch

-- 
2.5.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] rpm_5.4.14: Enable MIPS64 N32 transactions
  2015-12-02 21:30 [v2 PATCH 0/2] rpm: Enable MIPS64 N32 transactions Mark Hatle
@ 2015-12-02 21:30 ` Mark Hatle
  2015-12-02 21:30 ` [v2 PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Mark Hatle
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2015-12-02 21:30 UTC (permalink / raw)
  To: openembedded-core

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>
Signed-off-by: Robert Yang <liezhi.yang@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 d40cf2a..e22d208 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
@@ -413,6 +413,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
 
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [v2 PATCH 2/2] rpm: fix file conflicts for MIPS64 N32
  2015-12-02 21:30 [v2 PATCH 0/2] rpm: Enable MIPS64 N32 transactions Mark Hatle
  2015-12-02 21:30 ` [PATCH 1/2] rpm_5.4.14: " Mark Hatle
@ 2015-12-02 21:30 ` Mark Hatle
  2015-12-02 21:49   ` Mark Hatle
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Hatle @ 2015-12-02 21:30 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

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).

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 ...ction.c-fix-file-conflicts-for-mips64-N32.patch | 52 ++++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.14.bb            |  1 +
 2 files changed, 53 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..ed5d8a7
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
@@ -0,0 +1,52 @@
+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
+
+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".
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ lib/transaction.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: rpm-5.4.14/lib/transaction.c
+===================================================================
+--- rpm-5.4.14.orig/lib/transaction.c
++++ rpm-5.4.14/lib/transaction.c
+@@ -154,7 +154,7 @@ static int handleInstInstalledFile(const
+ 		fi->actions[fx] = FA_SKIPCOLOR;
+ #endif
+ 		rConflicts = 0;
+-	    } else if (FColor & prefcolor) {
++	    } else {
+ #ifdef	REFERENCE
+ 		rpmfsSetAction(fs, fx, FA_CREATE);
+ #else
+@@ -420,7 +420,7 @@ assert(otherFi != NULL);
+ 			fi->actions[i] = FA_SKIPCOLOR;
+ 			rConflicts = 0;
+ 		    } else
+-		    if (FColor == 0 && oFColor == 0) {
++		    {
+ 			/* ... otherwise, do both, last in wins. */
+ 			otherFi->actions[otherFileNum] = FA_CREATE;
+ 			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 e22d208..09baac0 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
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [v2 PATCH 2/2] rpm: fix file conflicts for MIPS64 N32
  2015-12-02 21:30 ` [v2 PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Mark Hatle
@ 2015-12-02 21:49   ` Mark Hatle
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2015-12-02 21:49 UTC (permalink / raw)
  To: openembedded-core

On 12/2/15 3:30 PM, Mark Hatle wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
> 
> 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

Above should be written "It did not -permit- "neither preferred"."

Updated version available at:

git://git.yoctoproject.org/poky-contrib mgh/rpm-n32


> 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).
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>  ...ction.c-fix-file-conflicts-for-mips64-N32.patch | 52 ++++++++++++++++++++++
>  meta/recipes-devtools/rpm/rpm_5.4.14.bb            |  1 +
>  2 files changed, 53 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..ed5d8a7
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
> @@ -0,0 +1,52 @@
> +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
> +
> +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".
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> +Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> +---
> + lib/transaction.c |    3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +Index: rpm-5.4.14/lib/transaction.c
> +===================================================================
> +--- rpm-5.4.14.orig/lib/transaction.c
> ++++ rpm-5.4.14/lib/transaction.c
> +@@ -154,7 +154,7 @@ static int handleInstInstalledFile(const
> + 		fi->actions[fx] = FA_SKIPCOLOR;
> + #endif
> + 		rConflicts = 0;
> +-	    } else if (FColor & prefcolor) {
> ++	    } else {
> + #ifdef	REFERENCE
> + 		rpmfsSetAction(fs, fx, FA_CREATE);
> + #else
> +@@ -420,7 +420,7 @@ assert(otherFi != NULL);
> + 			fi->actions[i] = FA_SKIPCOLOR;
> + 			rConflicts = 0;
> + 		    } else
> +-		    if (FColor == 0 && oFColor == 0) {
> ++		    {
> + 			/* ... otherwise, do both, last in wins. */
> + 			otherFi->actions[otherFileNum] = FA_CREATE;
> + 			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 e22d208..09baac0 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] 4+ messages in thread

end of thread, other threads:[~2015-12-02 21:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 21:30 [v2 PATCH 0/2] rpm: Enable MIPS64 N32 transactions Mark Hatle
2015-12-02 21:30 ` [PATCH 1/2] rpm_5.4.14: " Mark Hatle
2015-12-02 21:30 ` [v2 PATCH 2/2] rpm: fix file conflicts for MIPS64 N32 Mark Hatle
2015-12-02 21:49   ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox