All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package_rpm.bbclass: Fix translate_smart_to_oe arch comparison
@ 2013-03-02  1:14 Mark Hatle
  0 siblings, 0 replies; only message in thread
From: Mark Hatle @ 2013-03-02  1:14 UTC (permalink / raw)
  To: openembedded-core

When the OE arch is of the format "foo_bar-foobar" the previous
comparison routine did not selectively translate the '-' causing
a failed comparison.

In order to work around this issue, we -always- compare the
RPM translated version of the package architectures.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/package_rpm.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index c0ba54d..697bb36 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -93,7 +93,8 @@ translate_smart_to_oe() {
 			while [ -n "$1" ]; do
 				cmp_arch=$1
 				shift
-				if [ "$arch" = "$cmp_arch" -o "$fixed_arch" = "$cmp_arch" ]; then
+				fixed_cmp_arch=`echo "$cmp_arch" | tr _ -`
+				if [ "$fixed_arch" = "$fixed_cmp_arch" ]; then
 					if [ "$mlib" = "default" ]; then
 						new_pkg="$pkg"
 						new_arch=$cmp_arch
@@ -114,7 +115,7 @@ translate_smart_to_oe() {
 					# break
 				fi
 			done
-			if [ "$found" = "1" ] && [ "$arch" = "$cmp_arch" -o "$fixed_arch" = "$cmp_arch" ]; then
+			if [ "$found" = "1" ] && [ "$fixed_arch" = "$fixed_cmp_arch" ]; then
 				break
 			fi
 		done
-- 
1.7.1




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-02  1:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02  1:14 [PATCH] package_rpm.bbclass: Fix translate_smart_to_oe arch comparison Mark Hatle

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.