Bug 10132

Summary: Clarifications/corrections to '2.3.1. Viewing Logs from Failed Tasks'
Product: [Documentation] Reference Reporter: ulfalizer
Component: handbookAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: bluelightning, poky.doc.watcher, poky.watcher, srifenbark
Version: 2.2   
Target Milestone: 2.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: 12 July 2016: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description ulfalizer 2016-08-12 13:34:26 UTC
The following note at the end of '2.3.1. Viewing Logs from Failed Task' no
longer seems to be true and should be removed:

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

Here'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 = "CLOSED"
python do_pythontask() {
    print("to stdout")
    print("to stderr", 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.<pid> file. It'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 <pid> 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.<pid> and log.run_taskname.<pid>, where <pid> is the <pid>
  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
Comment 1 ulfalizer 2016-08-12 13:37:32 UTC
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.<pid> and log.run_taskname.<pid>, where <pid> is the <pid>
  the task had when it ran. The symlinks always point to the files
  corresponding to the most recent run.
Comment 2 Scott Rifenbark 2016-08-12 20:50:47 UTC
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
Comment 3 ulfalizer 2016-08-12 20:56:57 UTC
* All the .pid'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'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
Comment 5 ulfalizer 2016-08-12 21:37:08 UTC
Looks good now!

Thanks,
Ulf
Comment 6 Scott Rifenbark 2016-08-12 21:51:18 UTC
nice - 3 for 3.

Set to RESOLVED and doc flag off.

Scott