Skip to contentSkip to conversation

multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failure

PATCH Superseded Hongxu Jia 1 participant 3 messages Oct 15, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failure

Test steps:

1. env
vim local.conf
...
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS ?= "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 ?= "x86"
...

2. build lib32-meta-toolchain sucess

$ bitbake lib32-meta-toolchain

//Hongxu

The following changes since commit ccf5a4d2342c4fd40e4e0b332ea7e34e0bf175d4:

build-appliance-image: Update to dizzy head revision (2014-10-11 08:11:17 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-lib32-meta-toolchain
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-lib32-meta-toolchain

Hongxu Jia (1):
multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain
build failure

 meta/classes/multilib.bbclass  | 1 +
 meta/lib/oe/package_manager.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failure

There is a failure to build lib32-meta-toolchain:
...
|ERROR: lib32-packagegroup-core-standalone-sdk-target not found in the base feeds (qemux86_64 x86 noarch any all).
...

In package_manager.py, the variable 'DEFAULTTUNE_virtclass-multilib-lib32' is used to process multilib image/toolchain. But for the build of lib32- meta-toolchain, the value of 'DEFAULTTUNE_virtclass-multilib-lib32' is deleted. In 'bitbake lib32-meta-toolchain -e', we got:
...

|# $DEFAULTTUNE_virtclass-multilib-lib32 [2 operations]
|#   set? /home/jiahongxu/yocto/build-20141010-yocto/conf/local.conf:237
|#     "x86"
|#   del data_smart.py:406 [finalize]
|#     ""
|# pre-expansion value:
|#   "None"

...

The commit 899d45b90061eb3cf3e71029072eee42cd80930c in oe-core has delete it in DataSmart.finalize
...

Author: Richard Purdie <[email protected]>
Date:   Tue May 31 23:52:50 2011 +0100

bitbake/data_smart: Change overrides behaviour to remove
expanded variables from the datastore
...

We add an internal variable 'DEFAULTTUNE_ML_<multilib>', assign it with the value of 'DEFAULTTUNE_virtclass-multilib-lib32' before deleting, and read it in package_manager.py for multilib processing.

[YOCTO #6842]

---
 meta/classes/multilib.bbclass  | 1 +
 meta/lib/oe/package_manager.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
meta/classes/multilib.bbclass +1 -0
index 6e143dd..6aad894 100644
@@ -60,6 +60,7 @@ python multilib_virtclass_handler () {
     newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
     if newtune:
         e.data.setVar("DEFAULTTUNE", newtune)
+        e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
 }
 
 addhandler multilib_virtclass_handler
meta/lib/oe/package_manager.py +1 -1
index 27fdf26..ff66ece 100644
@@ -61,7 +61,7 @@ class RpmIndexer(Indexer):
                 eext = ext.split(':')
                 if len(eext) > 1 and eext[0] == 'multilib':
                     localdata = bb.data.createCopy(self.d)
-                    default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
+                    default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
                     default_tune = localdata.getVar(default_tune_key, False)
                     if default_tune:
                         localdata.setVar("DEFAULTTUNE", default_tune)
Signature · 1 line
1.9.1
author
#2 lore raw

meta/lib/oe/package_manager.py class RpmIndexer(Indexer): · line 67

Quoted 9 lines · Hongxu Jia
meta/lib/oe/package_manager.py +1 -1
@@ -61,7 +61,7 @@ class RpmIndexer(Indexer):
                  eext = ext.split(':')
                  if len(eext) > 1 and eext[0] == 'multilib':
                      localdata = bb.data.createCopy(self.d)
-                    default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
+                    default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
                      default_tune = localdata.getVar(default_tune_key, False)
                      if default_tune:
                          localdata.setVar("DEFAULTTUNE", default_tune)

It caused build failure of meta-toolchain, in order to avoid it, we should use DEFAULTTUNE_virtclass-multilib-lib32 first, if it is not available, and try to use DEFAULTTUNE_ML_<multilib>

So it does not affect previous build workflow.

Please drop it, V2 incoming

//Hongxu