Bug 1344

Summary: [MULTILIB] qt4: some FILES_XXX variables' names not prefixed
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Lianhao Lu <lianhao.lu>
Component: coreAssignee: Ke Yu <ke.yu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dongxiao.xu, ke.yu, meta.mr.watcher, meta.watcher, richard.purdie, shane.wang
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Lianhao Lu 2011-08-05 01:01:20 UTC
When building qt4 in multilib case, some FILES_xxx variables' names are not prefixed by multilib.bbclass, which in turn causes packages like lib64-libqtxml4 are not generated.
Comment 1 Lianhao Lu 2011-08-08 02:11:53 UTC
In the qt4.inc, it defines package content using something like the following way:

QT_BASE_NAME ?= "qt4"
PACKAGES += "${QT_BASE_NAME}-tools ... ..."
FILES_${QT_BASE_NAME}-tools = " ... ..."

It turns out that the current multilib.bbclass can not handle this kind of situation(using variable in variable names) correctly. Multilib.bbclass first searches the PACKAGES, and for each item <pkg> defined in the PACKAGES, it renames the FILES_<pkg> to FILES_<mlprefix>-<pkg>.

The whole process is happening in the anonymous python function when the variable name is not expanded. So when trying to rename FILES_qt4-tools to FILES_lib64-qt4-tools, there is no variable named FILES_qt4-tools, but only FILES_${QT_BASE_NAME}-tools. So the new variable FILES_lib64-qt4-tools is never got defined.
Comment 2 Richard Purdie 2011-08-08 06:13:22 UTC
Perhaps we should process PACKAGES unexpanded?
Comment 3 Ke Yu 2011-08-14 18:02:52 UTC
(In reply to comment #2)
> Perhaps we should process PACKAGES unexpanded?

meet other issue in qt4 when make PACKAGES unexpanded:

PACKAGES += " ${OTHER_PACKAGES}"
OTHER_PACKAGES = "\
               ${QT_BASE_NAME}-tools \
               ${QT_BASE_NAME}-assistant \
               ${QT_BASE_NAME}-common \
               ${QT_BASE_NAME}-dbus \


since PACKAGES is unexpanded, multilib.bbclass will map PACKAGES to lib64-${OTHER_PACKAGES}, instead of lib64-${QT_BASE_NAME}-tools, lib64-${QT_BASE_NAME}-assistant, ..., which is not correct.
Comment 4 Ke Yu 2011-08-15 05:47:57 UTC
another approach is make change in qt4.inc. i.e. expand the QT_BASE_NAME when assign the package name