<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/cooker.py, branch 2.2_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=2.2_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=2.2_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2016-07-20T15:46:12+00:00</updated>
<entry>
<title>bitbake: cooker: Fix incorrect dot file generation</title>
<updated>2016-07-20T15:46:12+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-07-20T15:08:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=90436919f802908152e40e2d3ea6fd6b54da910c'/>
<id>urn:sha1:90436919f802908152e40e2d3ea6fd6b54da910c</id>
<content type='text'>
In the runqueue cleanup/conversion, "dep" was mistakenly used where "tid" should
be leading to incorrect task-depends.dot files and causing general confusion.
Fix this, its clearly incorrect looking at the code.

(Bitbake rev: 689730dbb068c5ea3593e7b92fe5d5e5c0c3760a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker: clean up EvertWriter</title>
<updated>2016-06-20T16:23:57+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-06-20T11:00:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=95f6e7bd0f7188f59e66e1769799e44a123b638b'/>
<id>urn:sha1:95f6e7bd0f7188f59e66e1769799e44a123b638b</id>
<content type='text'>
Restructured EventWriter code to make it more readable:
 - got rid of init_file method as it's called only once
 - renamed exception variable e -&gt; err
 - renamed event variable e -&gt; evt
 - simplified main 'if' structure of send method

(Bitbake rev: 31977e7bb98f676197c6cee66f6ab4c12d4dcbde)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker: replace EventLogWriteHandler with namedtuple</title>
<updated>2016-06-20T16:23:57+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-06-20T11:00:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f6fc25d1df2b77cb1d6534b302812c3af97dfd28'/>
<id>urn:sha1:f6fc25d1df2b77cb1d6534b302812c3af97dfd28</id>
<content type='text'>
class EventLogWriteHandler is a simple wrapper class with only one
class member. Replacing it with namedtuple makes code less nested and more
readable.

(Bitbake rev: 7c5b6812d32d173df36e7f9fc1d877329e79f994)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker: don't remove event file</title>
<updated>2016-06-20T16:23:57+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-06-20T11:00:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a158388a51147320bd599299081f1ecfe1152a6a'/>
<id>urn:sha1:a158388a51147320bd599299081f1ecfe1152a6a</id>
<content type='text'>
There is no need to remove output file as it gets rewritten by
open(self.eventfile, 'w') anyway.

(Bitbake rev: 1fc9957837b7038dfb983217a3fcd880f143e3a4)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker: encode event objects to base64</title>
<updated>2016-06-20T16:23:57+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-06-20T11:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e28b36e1e8b2d6b1531698d6d50658e3fc73adc0'/>
<id>urn:sha1:e28b36e1e8b2d6b1531698d6d50658e3fc73adc0</id>
<content type='text'>
pickle converts python objects into the binary form that can't be
decoded to text and therefore can't be converted to JSON format.

Attempt to convert event objects raises this error:
TypeError:
    b'\x80\x03cbb.runqueue\nrunQueueTaskSkipped\nq\x00)...
    is not JSON serializable

Encoded pickled event objects to base64 to be able to convert data
structure to JSON.

[YOCTO #9803]

(Bitbake rev: f18055237e6084f90f6221442e3ba021dcc59c50)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker: move EventLogWriteHandler to the top module level</title>
<updated>2016-06-20T16:23:57+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-06-20T11:00:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3e7edc303cfcb08d16b357b04441fb295099f314'/>
<id>urn:sha1:3e7edc303cfcb08d16b357b04441fb295099f314</id>
<content type='text'>
EventLogWriteHandler object was created and used in
BBCooker.initConfigurationData.
This causes creation of multiple EventLogWriteHandler objects
and results in duplicated entries in the output event file
as BBCooker.initConfigurationData is called multiple times.

Added eventlogfile parameter to EventLogWriteHandler to avoid using
global variable DEFAULT_EVENTFILE.
Moved EventLogWriteHandler to the module level.
Created EventLogWriteHandler object in BBCooker.__init__ to ensure that only
one handler object is created.

(Bitbake rev: d3ad8eee850ec2df54aa09fae44cc7e69c12f32a)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: fix wrong usage of format_exc</title>
<updated>2016-06-16T10:51:26+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>eduard.bartosh@intel.com</email>
</author>
<published>2016-06-10T11:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=772e9b4eabf054cadb8ad2dc6b223aa6c30c7f46'/>
<id>urn:sha1:772e9b4eabf054cadb8ad2dc6b223aa6c30c7f46</id>
<content type='text'>
First parameter of traceback.format_exc is a 'limit' - a number
of stracktraces to format.

Passing exception object to format_exc is incorrect, but it works in
Python 2 as this code from traceback module works:
    while tb is not None and (limit is None or n &lt; limit):
Comparing integer counter n with the exception object in Python 2
always results in True. However, in Python 3 it throws exception:
    TypeError: unorderable types: int() &lt; &lt;Exception type&gt;()

As format_exc is used in except block of handling another
exception this can cause hard to find and debug bugs.

(Bitbake rev: a9509949d7e2adba6e3cd89f97daa19a955855b5)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: taskdata/runqueue: Rewrite without use of ID indirection</title>
<updated>2016-06-15T07:35:07+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-06-12T22:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=af04a52bf7d7ae94c187e85028a80dee6d7853f0'/>
<id>urn:sha1:af04a52bf7d7ae94c187e85028a80dee6d7853f0</id>
<content type='text'>
I'm not sure what possesed me when I wrote this code originally but its
indirection of everyting to use numeric IDs and position dependent lists
is horrific. Given the way python internals work, its completely and
utterly pointless from  performance perspective. It also makes the code
hard to understand and debug since any numeric ID has to be translated
into something human readable.

The hard part is that the IDs are infectous and spread from taskdata
into runqueue and even partly into cooker for the dependency graph
processing. The only real way to deal with this is to convert everything
to use a more sane data structure.

This patch:
* Uses "&lt;fn&gt;:&lt;taskname&gt;" as the ID for tasks rather than a number
* Changes to dict() based structures rather than position dependent lists
* Drops the build name, runtime name and filename ID indexes

On the most part there shouldn't be user visible changes. Sadly we did
leak datastructures to the setscene verify function which has to be
rewritten. To handle this, the variable name used to specifiy the version
changes from BB_SETSCENE_VERIFY_FUNCTION to BB_SETSCENE_VERIFY_FUNCTION2
allowing multiple versions of bitbake to work with suitably written
metadata. Anyone with custom schedulers may also need to change them.

I believe the benefits in code readability and easier debugging far
outweigh those issues though. It also means we have a saner codebase
to add multiconfig support on top of.

During development, I did have some of the original code coexisting with
the new data stores to allow comparision of the data and check it was
working correcty, particuarly for taskdata. I have also compared
task-depends.dot files before and after the change. There should be no
functionality changes in this patch, its purely a data structure change
and that is visible in the patch.

(Bitbake rev: 2c88afb60da54e58f555411a7bd7b006b0c29306)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker.py: fix warn() -&gt; warning()</title>
<updated>2016-06-13T11:16:10+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2016-06-12T08:45:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=71765a90d1ff455608a006ed32cf42110e779217'/>
<id>urn:sha1:71765a90d1ff455608a006ed32cf42110e779217</id>
<content type='text'>
Fixed:
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

(Bitbake rev: a3f464d202dafef4538e66c008cdecb7b8709ed1)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Convert to python 3</title>
<updated>2016-06-02T07:24:02+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-12T07:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0f2c59367a649de5f57acdccfb4f1fdba9cde730'/>
<id>urn:sha1:0f2c59367a649de5f57acdccfb4f1fdba9cde730</id>
<content type='text'>
Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.

(Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
