diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-05 12:50:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-05 22:26:20 +0000 |
commit | 4a85312568a6bb052cc511c15b4ae842ff7f8e59 (patch) | |
tree | ceef6136a63d15f8342bf38f62ff36643bfbea50 /meta/classes/package_ipk.bbclass | |
parent | c3400040fdce8c049b51a8acb06eb2e92f9426d1 (diff) | |
download | openembedded-core-4a85312568a6bb052cc511c15b4ae842ff7f8e59.tar.gz openembedded-core-4a85312568a6bb052cc511c15b4ae842ff7f8e59.tar.bz2 openembedded-core-4a85312568a6bb052cc511c15b4ae842ff7f8e59.zip |
image-mklibs/package_ipk: Remove bashisms
We now support using dash but these bashisms triggered build failures for me
when using it. This replaces the code with something which works on dash.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index aeabc11018..36dedb9c61 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -72,8 +72,10 @@ package_tryout_install_multilib_ipk() { local ipkg_args="-f ${INSTALL_CONF_IPK} -o ${target_rootfs} --force_overwrite" local selected_pkg="" local pkgname_prefix="${item}-" + local pkgname_len=${#pkgname_prefix} for pkg in ${INSTALL_PACKAGES_MULTILIB_IPK}; do - if [ ${pkg:0:${#pkgname_prefix}} == ${pkgname_prefix} ]; then + local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var - 1); print pkgname; }' ) + if [ ${pkgname} = ${pkgname_prefix} ]; then selected_pkg="${selected_pkg} ${pkg}" fi done @@ -94,7 +96,9 @@ split_multilib_packages() { is_multilib=0 for item in ${MULTILIB_VARIANTS}; do local pkgname_prefix="${item}-" - if [ ${pkg:0:${#pkgname_prefix}} == ${pkgname_prefix} ]; then + local pkgname_len=${#pkgname_prefix} + local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var - 1); print pkgname; }' ) + if [ ${pkgname} = ${pkgname_prefix} ]; then is_multilib=1 break fi |