<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10099</bug_id>
          
          <creation_ts>2016-08-08 20:42:57 +0000</creation_ts>
          <short_desc>Clarifying and fleshing out debugging with &apos;bitbake -e&apos;</short_desc>
          <delta_ts>2016-08-08 21:43:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>08 August 2016: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulfalizer</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64969</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-08 20:42:57 +0000</bug_when>
    <thetext>I suggest the following changes. &apos;bitbake -e&apos; is a very important debugging
aid, hence why I think it should be moved earlier. I have also seen people
being confused about the &quot;scope&quot; of variables, so I&apos;ll piggyback a note that
might help.

* Rename &apos;2.3.1. Task Failures&apos; to &apos;2.3.1. Viewing logs from failed tasks&apos;.

* Move &apos;2.3.8 Variables&apos; to 2.3.2. and rename it to &apos;2.3.2. Viewing variable
values&apos; (this makes it consistent with 2.3.1). Rewrite it like this to clarify
and flesh it out:

  BitBake&apos;s -e option is used to display variable values after parsing. The
  following command displays the variable values after the configuration
  (local.conf, bblayers.conf, etc.) has been parsed.
  
      $ bitbake -e
  
  The following command displays variable values after a specific recipe
  has been parsed. This includes variables from the configuration as well.
  
      $ bitbake -e recipename
  
  Note {
  Each recipe has its own private set of variables (datastore). Internally, after
  parsing the configuration, a copy of the resulting datastore is made prior to
  parsing each recipe. This implies that variables set in one recipe won&apos;t be
  visible to other recipes.
  
  Likewise, each task within a recipe gets a private datastore based on the
  recipe datastore, meaning variables set within one task won&apos;t be visible to
  other tasks.
  }
  
  In the output of bitbake -e, each variable is preceded by a description of
  how the variable got its value, including temporary values that were later
  overriden. This description also includes variable flags (varflags) set on
  the variable. This can be a very handy debugging aid.


Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64972</commentid>
    <comment_count>1</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-08 21:10:28 +0000</bug_when>
    <thetext>Here&apos;s another thing that could be added to the end. I picked CC since it&apos;s an important variable.

  Variables that are exported to the environment are preceded by &apos;export&apos; in
  the output of &apos;bitbake -e&apos;, like in the example below.
  
    export CC=&quot;i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64973</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-08 21:17:23 +0000</bug_when>
    <thetext>Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-logs-from-failed-tasks for the rename of the log section.

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values for the renamed and repositions section on viewing variable values.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64974</commentid>
    <comment_count>3</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-08 21:20:33 +0000</bug_when>
    <thetext>&quot;The output can be a very help during debugging.&quot;

Looks fine other than that. :)

Note the &apos;export&apos; section I added too.

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64975</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-08 21:24:25 +0000</bug_when>
    <thetext>ok - see http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values.  Had a mid-air collision on Comment 1...  Had a finger failure on that last sentence... :)

Check it out now :)

http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64976</commentid>
    <comment_count>5</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-08 21:27:22 +0000</bug_when>
    <thetext>Looks good now!

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64977</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-08 21:43:28 +0000</bug_when>
    <thetext>Thanks - resetting doc flag and putting as RESOLVED

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>