Bug 5724 - bitbake -e sometimes is not useful
Summary: bitbake -e sometimes is not useful
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.6
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-01-14 14:46 UTC by Gary Thomas
Modified: 2014-03-27 10:18 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Thomas 2014-01-14 14:46:27 UTC

    
Comment 1 Gary Thomas 2014-01-14 14:49:22 UTC
Sometimes 'bitbake -e recipe' only prints an error and not the useful variable dump.

To recreate this using OE-core, simply remove x11 from DISTRO_FESTURES, e.g. in local.conf
  DISTRO_FEATURES_remove = "x11"

Then you will see this error:

$ bitbake -e virtual/libx11
WARNING: Host distribution "Fedora-13" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##################################################################################| ETA:  00:00:00
Loaded 1188 entries from dependency cache.
ERROR: Nothing PROVIDES 'virtual/libx11'
ERROR: libx11-diet PROVIDES virtual/libx11 but was skipped: missing required distro feature ['x11'] (not in DISTRO_FEATURES)
ERROR: libx11 PROVIDES virtual/libx11 but was skipped: missing required distro feature ['x11'] (not in DISTRO_FEATURES)
ERROR: nativesdk-libx11 PROVIDES virtual/libx11 but was skipped: missing required distro feature ['x11'] (not in DISTRO_FEATURES)

It seems to only happen on virtual targets.  A similar test
  $ bitbake -e gst-plugins-base
will yield the correct dump.
Comment 2 Paul Eggleton 2014-01-16 15:51:18 UTC
I wonder if we should put errors out to stderr so that they don't get redirected by default, and thus would have been visible in this case. This would be easy to do but would be a change in established behaviour.

(That's assuming we can't just bypass errors like this when -e is used.)
Comment 3 Richard Purdie 2014-03-26 16:35:35 UTC
I'd like to understand which bug we're trying to fix here.

Removing x11 from DISTRO_FEATURES and then trying to build libx11 is going to generate an error since the x11 recipes don't parse in that scenerio and nothing does provide libx11. The error message provided does even say what the problem is.

So is the real issue this bug is addressing that error messages go to stdout? If we fix that are we done here? I suspect there is some context I'm missing, maybe a discussion between Gary and Paul about a specific bug this triggered?
Comment 4 Gary Thomas 2014-03-26 21:18:38 UTC
This came as a result of this thread:
  https://lists.yoctoproject.org/pipermail/yocto/2014-January/017825.html

Basically, I was trying to create a QTe environment, so X11 was removed from
DISTRO_FEATURES which yielded an inconsistency error.  The recommendation was
to use 'bitbake -e' to diagnose it, but this proved unworkable because the
process bailed before printing any of the useful variables which might help
diagnose the situation.
Comment 5 Richard Purdie 2014-03-27 10:18:13 UTC
Code to make stdout/stderr work better is now in:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6ef47ec5fdec8f4b1315dc269b50a02c5b58fbaf