Bug 2406

Summary: conditionally compile or depends according to pkg's existence
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robert Yang <liezhi.yang>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: Low CC: mark.hatle, poky.bs.watcher, poky.watcher, richard.purdie, sgw, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.3   
Hardware: x86   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=2404
Whiteboard: (P2)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2012-05-03 10:07:09 UTC
we can conditionally compile or depends according to FEATURES currently, for example:

DEPENDS = "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
           ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \

but we can't according to PACKAGES, which is easier and straighter to use.

I think that if we can predict the pkg that would be built and save it to a variable like ALL_PACKAGES, then we can use it as:
${@base_contains('ALL_PACKAGES', 'directfb', 'directfb', '', d)}
Comment 1 Richard Purdie 2012-05-04 14:58:18 UTC
This model does not really fit well within the system and the idea of deterministic builds. 

I think requiring the user to make a selection of DISTRO_FEATURES which remain consistent for a given build directory is going to be easier for the user to understand what is going on rather than things happening near enough randomly depending on what order packages were built for example.