Skip to contentSkip to conversation

rootfs_rpm.bbclass: normalize arch output of list_installed_packages

PATCH New Ming Liu 1 participant 1 message Nov 26, 2012

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

PATCH 1/1 rootfs_rpm.bbclass: normalize arch output of list_installed_packages

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.

---
 meta/classes/rootfs_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/rootfs_rpm.bbclass +1 -1
index c86cd09..300dd5f 100644
@@ -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
Signature · 1 line
1.7.11