diff options
| author | Lianhao Lu <lianhao.lu@intel.com> | 2011-08-16 16:26:49 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-17 15:14:56 +0100 |
| commit | 57bd62ad5c623216b50393841e1e75c867894765 (patch) | |
| tree | ed020390a1f8c9839b61982d0c0453f60233df81 /meta/classes/package_ipk.bbclass | |
| parent | f759bde4f7c3a0f82a0a910df2ead755ae989ac2 (diff) | |
| download | poky-57bd62ad5c623216b50393841e1e75c867894765.tar.gz | |
package(_ipk).bbclass: opkg using ALL_MULTILIB_PACKAGE_ARCHS
[YOCTO #1345]
The new variable ALL_MULTILIB_PACKAGE_ARCHS contains all the values of
PACKAGE_ARCHS for each multilib variants. The opkg backend now uses this
new value insteald of the PACKAGE_ARCHS to update the opkg indexes and
to generate the opkg configuration files. This allows the normal
packages and multilib packages may be installed into the same rootfs.
(From OE-Core rev: b774bf44ef004276da12a83ebd69715c00b596ac)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
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 | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 8ecf5111a8..e83aff8fe9 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
| @@ -64,14 +64,13 @@ python package_ipk_install () { | |||
| 64 | package_tryout_install_multilib_ipk() { | 64 | package_tryout_install_multilib_ipk() { |
| 65 | #try install multilib | 65 | #try install multilib |
| 66 | multilib_tryout_dirs="" | 66 | multilib_tryout_dirs="" |
| 67 | for arch in ${MULTILIB_ARCHS}; do | 67 | for item in ${MULTILIB_VARIANTS}; do |
| 68 | local target_rootfs="${MULTILIB_TEMP_ROOTFS}/${arch}" | 68 | local target_rootfs="${MULTILIB_TEMP_ROOTFS}/${item}" |
| 69 | local ipkg_args="-f ${INSTALL_CONF_IPK} -o ${target_rootfs} --force_overwrite" | 69 | local ipkg_args="-f ${INSTALL_CONF_IPK} -o ${target_rootfs} --force_overwrite" |
| 70 | local selected_pkg="" | 70 | local selected_pkg="" |
| 71 | #strip the "ml" from package_arch | 71 | local pkgname_prefix="${item}-" |
| 72 | local pkgarch_prefix="${arch:2}-" | 72 | for pkg in ${INSTALL_PACKAGES_MULTILIB_IPK}; do |
| 73 | for pkg in "${INSTALL_PACKAGES_MULTILIB_IPK}"; do | 73 | if [ ${pkg:0:${#pkgname_prefix}} == ${pkgname_prefix} ]; then |
| 74 | if [ ${pkg:0:${#pkgarch_prefix}} == ${pkgarch_prefix} ]; then | ||
| 75 | selected_pkg="${selected_pkg} ${pkg}" | 74 | selected_pkg="${selected_pkg} ${pkg}" |
| 76 | fi | 75 | fi |
| 77 | done | 76 | done |
| @@ -163,7 +162,7 @@ ipk_log_check() { | |||
| 163 | package_update_index_ipk () { | 162 | package_update_index_ipk () { |
| 164 | set -x | 163 | set -x |
| 165 | 164 | ||
| 166 | ipkgarchs="${PACKAGE_ARCHS} ${SDK_PACKAGE_ARCHS}" | 165 | ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS} ${SDK_PACKAGE_ARCHS}" |
| 167 | 166 | ||
| 168 | if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then | 167 | if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then |
| 169 | return | 168 | return |
| @@ -203,19 +202,12 @@ package_generate_ipkg_conf () { | |||
| 203 | done | 202 | done |
| 204 | 203 | ||
| 205 | echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_TARGET} | 204 | echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_TARGET} |
| 206 | ipkgarchs="${PACKAGE_ARCHS}" | 205 | ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}" |
| 207 | for arch in $ipkgarchs; do | 206 | for arch in $ipkgarchs; do |
| 208 | if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then | 207 | if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then |
| 209 | echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} | 208 | echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} |
| 210 | fi | 209 | fi |
| 211 | done | 210 | done |
| 212 | |||
| 213 | multilib_archs="${MULTILIB_ARCHS}" | ||
| 214 | for arch in $multilib_archs; do | ||
| 215 | if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then | ||
| 216 | echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} | ||
| 217 | fi | ||
| 218 | done | ||
| 219 | } | 211 | } |
| 220 | 212 | ||
| 221 | package_generate_archlist () { | 213 | package_generate_archlist () { |
| @@ -226,18 +218,12 @@ package_generate_archlist () { | |||
| 226 | priority=$(expr $priority + 5) | 218 | priority=$(expr $priority + 5) |
| 227 | done | 219 | done |
| 228 | 220 | ||
| 229 | ipkgarchs="${PACKAGE_ARCHS}" | 221 | ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}" |
| 230 | priority=1 | 222 | priority=1 |
| 231 | for arch in $ipkgarchs; do | 223 | for arch in $ipkgarchs; do |
| 232 | echo "arch $arch $priority" >> ${IPKGCONF_TARGET} | 224 | echo "arch $arch $priority" >> ${IPKGCONF_TARGET} |
| 233 | priority=$(expr $priority + 5) | 225 | priority=$(expr $priority + 5) |
| 234 | done | 226 | done |
| 235 | |||
| 236 | multilib_archs="${MULTILIB_ARCHS}" | ||
| 237 | for arch in $multilib_archs; do | ||
| 238 | echo "arch $arch $priority" >> ${IPKGCONF_TARGET} | ||
| 239 | priority=$(expr $priority + 5) | ||
| 240 | done | ||
| 241 | } | 227 | } |
| 242 | 228 | ||
| 243 | python do_package_ipk () { | 229 | python do_package_ipk () { |
