]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm.bbclass: Fix translate_smart_to_oe arch comparison
authorMark Hatle <mark.hatle@windriver.com>
Sat, 2 Mar 2013 01:14:57 +0000 (19:14 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Mar 2013 12:59:00 +0000 (12:59 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index c0ba54dd9c68caca367a1a360774936363c5e5e8..697bb365c538ec3fc86fc4d495901c29177f01cb 100644 (file)
@@ -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