Bug 2406 - conditionally compile or depends according to pkg's existence
Summary: conditionally compile or depends according to pkg's existence
Status: RESOLVED INVALID
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.3
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard: (P2)
Depends on:
Blocks:
 
Reported: 2012-05-03 10:07 UTC by Robert Yang
Modified: 2012-05-04 14:58 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.