]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs_rpm.bbclass: normalize arch output of list_installed_packages
authorMing Liu <ming.liu@windriver.com>
Mon, 26 Nov 2012 02:24:03 +0000 (10:24 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Dec 2012 13:48:23 +0000 (13:48 +0000)
list_installed_packages should output uniform formatted archs for all
packaging system(deb, rpm and ipk), for they are used by common code to
grab the package infos. Otherwise, it will lead some -dbg packages to be
missed processing in come cases.

It's introduced by commit: fc985f51, package_rpm.bbclass: fix the arch
(replace "-" with "_").

Fixed by replacing "_" back to "-" in list_installed_packages, make it
output real arch values which can be safely used.

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs_rpm.bbclass

index c86cd094ff1234d6aa37fde51849f0cca25c6ea6..300dd5f75d64c2afd612a83b3253f1fff0dff25b 100644 (file)
@@ -153,7 +153,7 @@ list_installed_packages() {
 
        # print the info, need to different return counts
        if [ "$1" = "arch" ] ; then
-               echo "$GET_LIST" | awk '{print $1, $2}'
+               echo "$GET_LIST" | awk '{gsub("_", "-", $2); print $1, $2}'
         elif [ "$1" = "file" ] ; then
                echo "$GET_LIST" | awk '{print $1, $3}'
         else