<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/process.py, branch uninative-2.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2017-06-14T13:54:24+00:00</updated>
<entry>
<title>bitbake: bitbake:process: flush stderr/stdout to log</title>
<updated>2017-06-14T13:54:24+00:00</updated>
<author>
<name>Juro Bystricky</name>
<email>juro.bystricky@intel.com</email>
</author>
<published>2017-06-13T16:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=06e9b44f97a4ba5552d2b2ad1d10acd1871ac1ce'/>
<id>urn:sha1:06e9b44f97a4ba5552d2b2ad1d10acd1871ac1ce</id>
<content type='text'>
When a process terminates, some messages may still remain in stdout or
stderr and do not make it into the log file.
In addition, the messages that do make it to the log file may end up in
the log file in incorrect order.
This patch flushes all messages into the log file after the
process terminates. Some additional log flushing is also needed
to keep the various messages showing up in the log file in proper order.

[YOCTO#10785]

(Bitbake rev: 1f6e6aa8262369eafc3bbf9f01f8d981f90becdf)

Signed-off-by: Juro Bystricky &lt;juro.bystricky@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: stop bb.process.communicate mixing bytes and str return types</title>
<updated>2017-03-01T11:16:07+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2017-02-24T16:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7b75bf85059f0d4fc873b27d31ff17eb97815db9'/>
<id>urn:sha1:7b75bf85059f0d4fc873b27d31ff17eb97815db9</id>
<content type='text'>
Python3 regards b"" as False so it is not being converted to a string by
d0f904d407f57998419bd9c305ce53e5eaa36b24. This confusingly causes three
different potential types for each member of the returned tuple.

Let's just assume that everything that's not None is a bytes object and
convert it to a string.

(Bitbake rev: 0cf5589b7fb3582a6caca5014c4d8152347df545)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.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>
<entry>
<title>bitbake: Fix default function parameter assignment to a list</title>
<updated>2015-08-19T17:05:44+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2015-08-17T11:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=715d857174ceca82b85d6c8c7df520047ba7fb0c'/>
<id>urn:sha1:715d857174ceca82b85d6c8c7df520047ba7fb0c</id>
<content type='text'>
With python you should not assign a list as the default value of a
function parameter - because a list is mutable, the result will be that
the first time a value is passed it will actually modify the default.
Reference:

http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

(Bitbake rev: 7859f7388f2e3f675d0e1527cfde18625f36f637)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/process: check output of select() before reading extrafiles</title>
<updated>2015-07-16T14:09:26+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2015-07-14T08:48:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5261c5b5bde25a5e4b2e9268ee401071a187468b'/>
<id>urn:sha1:5261c5b5bde25a5e4b2e9268ee401071a187468b</id>
<content type='text'>
We're calling select() to find the fds that have data available, so we
really ought to check the return to see if the extra file is in there
before trying to read from it. This is part of the fix for the
performance regression that this code introduced (5-10 minutes extra in
a reasonable size OE build); the rest is down to an issue in the way
that pseudo currently handles FIFOs and will need to be addressed there,
see: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7993

Solution suggested by Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

(Bitbake rev: 3e2db8d7eaa0f14813213d1c95d3ee9efd97dc9d)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb: set up infrastructure for shell message functions</title>
<updated>2015-07-12T21:50:40+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2015-07-10T13:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3b5031230717d7430951dfa4a148b7f83bad514b'/>
<id>urn:sha1:3b5031230717d7430951dfa4a148b7f83bad514b</id>
<content type='text'>
Create a fifo under ${T} for each running task that can be used by the
task to send events back to BitBake. The purpose of this is to allow
OpenEmbedded's logging.bbclass (which provides shell function
equivalents for bb.warn(), bb.note() etc.) to have those functions
trigger the appropriate events within BitBake so that messages are shown
through the BitBake UI rather than just in the task log; to do that we
just call the python functions.

Part of the fix for [YOCTO #5275].

(Bitbake rev: bae330a1f8a59a912eca71177b3c6ba7c92a2f38)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Add timeout to select call</title>
<updated>2013-12-10T17:55:29+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-12-10T17:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d754ddcec78f5e264100ceda854e8412679d6866'/>
<id>urn:sha1:d754ddcec78f5e264100ceda854e8412679d6866</id>
<content type='text'>
On some machines, a hang has been noticed where the system sits in
the select call despite the task having completed.

The exact reasons for this as unknown but adding a timeout unblocked
the builds and resolved the hangs in question.

(Bitbake rev: 5223ffb5b6a46d8b3f6ac3362bd2672e2edf2691)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib: Use modern expcetion syntax</title>
<updated>2013-05-09T21:28:24+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-05-09T21:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3e86a6cddef330e08170887104f0aebae96183a6'/>
<id>urn:sha1:3e86a6cddef330e08170887104f0aebae96183a6</id>
<content type='text'>
(Bitbake rev: a4a37b6a83faa62f61433122c4583e93e64f7372)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib: Clean up various file access syntax</title>
<updated>2013-05-09T21:28:04+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-05-09T21:06:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4a081b5a52e3d27da8d4b062f3fda292e8d8fb0a'/>
<id>urn:sha1:4a081b5a52e3d27da8d4b062f3fda292e8d8fb0a</id>
<content type='text'>
Python 3 is stricter about how files are accessed. Specficially:

 * Use open(), not file()
 * Use binary mode for binary files (when checksumming)
 * Use with statements to ensure files get closed
 * Add missing file close statements

(Bitbake rev: 9f08b901375ba640f47596f1bcf43f98a931550f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: process: Improve _logged_communicate buffering</title>
<updated>2012-06-25T13:57:16+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2012-06-22T11:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a87aa7b7af4f43d86b4d89f90a9c3b134d12f006'/>
<id>urn:sha1:a87aa7b7af4f43d86b4d89f90a9c3b134d12f006</id>
<content type='text'>
There are two problems with the _logged_communicate that are both
caused as a result of buffering I/O issues:

1) log truncation when python fails

2) While a bitbake task is running it is impossible to see what is
   going on if it is only writing a small incremental log that is
   smaller than the buffer, or you get only a partial log, up until
   the task exists.  It is worse in the case that stderr and stdout
   are separate file handles, because previous code blocks on the read
   of stdout and then stderr, serially.

The right approach is simply to use select() to determine if there is
data available and also flush the log before exiting.

This is based on a patch from Jason Wessel &lt;jason.wessel@windriver.com&gt;
with some changes to flush upon exit, abstract the non blocking file
descriptor setup and drop the buffer size parameter.

(Bitbake rev: 361fb71e907aa84c28ecec79fefc6ca39c39172f)

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