<?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>10132</bug_id>
          
          <creation_ts>2016-08-12 13:34:26 +0000</creation_ts>
          <short_desc>Clarifications/corrections to &apos;2.3.1. Viewing Logs from Failed Tasks&apos;</short_desc>
          <delta_ts>2016-08-12 21:51:18 +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>12 July 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>65123</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 13:34:26 +0000</bug_when>
    <thetext>The following note at the end of &apos;2.3.1. Viewing Logs from Failed Task&apos; no
longer seems to be true and should be removed:

  Presently, the output from Python tasks is sent directly to the console.

Here&apos;s a test recipe that shows this. The stdout/stderr output from the Python
task ends up in log.do_pythontask and is not printed to the terminal.

LICENSE = &quot;CLOSED&quot;
python do_pythontask() {
    print(&quot;to stdout&quot;)
    print(&quot;to stderr&quot;, file=sys.stderr)
}
addtask pythontask before do_build


Additionally, the current description makes it sound like you manually have to
hunt down the correct run.do_taskname.&lt;pid&gt; file. It&apos;s never mentioned that
there are symlinks that point to the latest one. I suggest rewriting things as
follows (note that only the second paragraph includes the &lt;pid&gt; part now).

  The log for a task can be found in the file
  ${[WORKDIR]}/temp/log.do_taskname. For example, the log for the do_compile
  task of the QEMU minimal image for the x86 machine (qemux86) might be
  tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile. To
  see the commands BitBake ran to generate that log, look at the corresponding
  run.do_taskname file in the same directory.

  log.do_taskname and run.do_taskname are really symbolic links to
  log.do_taskname.&lt;pid&gt; and log.run_taskname.&lt;pid&gt;, where &lt;pid&gt; is the &lt;pid&gt;
  the task had when it ran. The symlinks always point to the files
  corresponding to the most recent run.


(Note the linkification of WORKDIR.)

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65124</commentid>
    <comment_count>1</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 13:37:32 +0000</bug_when>
    <thetext>Version 2:

  The log for a task can be found in the file
  ${[WORKDIR]}/temp/log.do_taskname. For example, the log for the do_compile
  task of the QEMU minimal image for the x86 machine (qemux86) might be
  in tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile.
  To see the commands BitBake ran to generate a log, look at the
  corresponding run.do_taskname file in the same directory.

  log.do_taskname and run.do_taskname are really symbolic links to
  log.do_taskname.&lt;pid&gt; and log.run_taskname.&lt;pid&gt;, where &lt;pid&gt; is the &lt;pid&gt;
  the task had when it ran. The symlinks always point to the files
  corresponding to the most recent run.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65153</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 20:50:47 +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 and let me know of any problems. 

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65155</commentid>
    <comment_count>3</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 20:56:57 +0000</bug_when>
    <thetext>* All the .pid&apos;s could be removed from the first paragraph. The only thing people usually care about is the latest version of the log/run files, which they&apos;ll get via the symlinks. The second paragraph then mentions the .pid files.

* ${WORKDIR} could be linkified in ${WORKDIR}/temp/log.do_taskname.

Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65162</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 21:33:30 +0000</bug_when>
    <thetext>Ulf, 

How is this? http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-logs-from-failed-tasks

scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65164</commentid>
    <comment_count>5</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-08-12 21:37:08 +0000</bug_when>
    <thetext>Looks good now!

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65169</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-08-12 21:51:18 +0000</bug_when>
    <thetext>nice - 3 for 3.

Set to RESOLVED and doc flag off.

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>