Patchwork [1/2] package_ipk.bbclass: fixing muttilib prefix extracting.

login
register
mail settings
Submitter Lianhao Lu
Date April 5, 2012, 11:49 a.m.
Message ID <0e25605bf5ef290a098abc577c99607a99493df5.1333626413.git.lianhao.lu@intel.com>
Download mbox | patch
Permalink /patch/25195/
State Accepted
Commit 0e66900cbe6438b9b3ecfef1c348a5575bd27c41
Headers show

Comments

Lianhao Lu - April 5, 2012, 11:49 a.m.
Fixed an error in multilib prefix extracting.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/classes/package_ipk.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index e4a217b..b3560cf 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -74,7 +74,7 @@  package_tryout_install_multilib_ipk() {
 		local pkgname_prefix="${item}-"
 		local pkgname_len=${#pkgname_prefix}
 		for pkg in ${INSTALL_PACKAGES_MULTILIB_IPK}; do
-			local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var - 1); print pkgname; }' )
+			local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var); print pkgname; }' )
 			if [ ${pkgname} = ${pkgname_prefix} ]; then
 			    selected_pkg="${selected_pkg} ${pkg}"
 			fi
@@ -97,7 +97,7 @@  split_multilib_packages() {
 		for item in ${MULTILIB_VARIANTS}; do
 			local pkgname_prefix="${item}-"
 			local pkgname_len=${#pkgname_prefix}
-			local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var - 1); print pkgname; }' )
+			local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var); print pkgname; }' )
 			if [ ${pkgname} = ${pkgname_prefix} ]; then
 				is_multilib=1
 				break