<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/command.py, branch 4.2_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-01-11T10:58:36+00:00</updated>
<entry>
<title>bitbake: process/cooker/command: Fix currentAsyncCommand locking/races</title>
<updated>2023-01-11T10:58:36+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-01-09T23:17:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=165e8b563d400bf54c317659a267db85e8c34006'/>
<id>urn:sha1:165e8b563d400bf54c317659a267db85e8c34006</id>
<content type='text'>
currentAsyncCommand currently doesn't have any locking and we have
a conflict in "idle" conditions since the idle functions count needs
to be zero *and* there needs to be no active command.

Move the changes/checks of currentAsyncCommand to within the lock
and then we can add it to the condition for idle, simplifying some
of the code.

(Bitbake rev: b5215887d2f8ea3f28f1ebda721bd5b8f93ec7f3)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker/command: Drop async command handler indirection via cooker</title>
<updated>2023-01-11T10:58:36+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-01-09T16:37:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4e4f040a73ca81f830cf90af05b75e7c06f91d8d'/>
<id>urn:sha1:4e4f040a73ca81f830cf90af05b75e7c06f91d8d</id>
<content type='text'>
Indirecting the async command handler via cooker is confusing and no
longer needed. Drop it to make things slightly clearer.

(Bitbake rev: 4a41a7d0594e6a84a67b9de70a505858aebcd84a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: command: Ensure that failure cases call finishAsyncComand</title>
<updated>2023-01-02T17:32:57+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-01-02T16:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=82e77db0cec6d380766e510b9b8fdd95e2b889d0'/>
<id>urn:sha1:82e77db0cec6d380766e510b9b8fdd95e2b889d0</id>
<content type='text'>
There are a couple of failure cases that runCommands needs to better
handle, ensuring finishAsyncCommand is called. This doesn't matter if the
server is about to shut down but for memory resident bitbake and with
threading enabled, correctness is more important this could could in
theory lead to problems with the recent code changes.

By using the idleFinish class, it ensures the current async command
is terminated correctly and the various state pieces around commands
finishing are called. This also makes the code more uniform matching
the other exception handling code.

(Bitbake rev: 367a83ed46c7fbcdd06579b6cc3a6e48a89ca7fb)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Run idle commands in a separate idle thread</title>
<updated>2022-12-31T17:05:17+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-30T22:13:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4c57c6eeecc43d0479380144f3073e61a8b43375'/>
<id>urn:sha1:4c57c6eeecc43d0479380144f3073e61a8b43375</id>
<content type='text'>
When bitbake is off running heavier "idle" commands, it doesn't service it's
command socket which means stopping/interrupting it is hard. It also means we
can't "ping" from the UI to know if it is still alive.

For those reasons, split idle command execution into it's own thread.

The commands are generally already self containted so this is easier than
expected. We do have to be careful to only handle inotify poll() from a single
thread at a time. It also means we always have to use a thread lock when sending
events since both the idle thread and the command thread may generate log messages
(and hence events). The patch depends on  previous fixes to the builtins locking
in event.py and the heartbeat enable/disable changes as well as other locking
additions.

We use a condition to signal from the idle thread when other sections of code
can continue, thanks to Joshua Watt for the review and tweaks squashed into this
patch. We do have some sync points where we need to ensure any currently executing
commands have finished before we can start a new async command for example.

(Bitbake rev: 67dd9a5e84811df8869a82da6a37a41ee8fe94e2)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: server/process: Improve idle loop exit code</title>
<updated>2022-12-31T17:05:17+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-29T14:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c4ecfc4dc5511a23e12ed68eb140a67fd4181127'/>
<id>urn:sha1:c4ecfc4dc5511a23e12ed68eb140a67fd4181127</id>
<content type='text'>
When idle handlers want to exit, returning "False" isn't very clear
and also causes challenges with the ordering of the removing the idle
handler and marking that no async command is running.

Use a specific class to signal the exit condition allowing clearer code
and allowing the async command to be cleared after the handler has been
removed, reducing any opportunity for races.

(Bitbake rev: 102e8d0d4c5c0dd8c7ba09ad26589deec77e4308)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: command: Tweak finishAsyncCommand ordering to avoid races</title>
<updated>2022-12-31T17:05:17+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-29T16:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4895e78234afb9dc4d41fd5c26e064efeabbb7b6'/>
<id>urn:sha1:4895e78234afb9dc4d41fd5c26e064efeabbb7b6</id>
<content type='text'>
(Bitbake rev: 89435442946767cfe58eedde363802add8f1ab29)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: command: Add ping command</title>
<updated>2022-12-21T14:15:26+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-19T16:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=26f255da09e0f704af3d1535d3f8c5cd8b702a73'/>
<id>urn:sha1:26f255da09e0f704af3d1535d3f8c5cd8b702a73</id>
<content type='text'>
Add a simple ping command so the UI can check the server is still there.

(Bitbake rev: fd3359de0b9f18fac187a629df203be0b2c87545)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: command.py: cleanup bb.cache.parse_recipe</title>
<updated>2022-11-27T23:48:15+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2022-11-24T09:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a5f1b44310aac727e9bef3a1014e32da7b104c7d'/>
<id>urn:sha1:a5f1b44310aac727e9bef3a1014e32da7b104c7d</id>
<content type='text'>
The parse_recipe has been removed from bb.cache, replace it with
the databuilder._parse_recipe.

(Bitbake rev: d386fa81848247a3d407debf889db8cbcce03359)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache/cookerdata: Move recipe parsing functions from cache to databuilder</title>
<updated>2022-11-20T08:31:28+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-11-15T22:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3a4aeda0fa67ae4a2f8c79e83c734b45dde95543'/>
<id>urn:sha1:3a4aeda0fa67ae4a2f8c79e83c734b45dde95543</id>
<content type='text'>
When 'NoCache' was written, databuilder/cookerdata didn't exist. It does
now and the recipe parsing functionality contained in NoCache clearly
belongs there, it isn't a cache function. Move those functions, renaming
to match the style in databuilder but otherwise not changing functionality
for now. Fix up the callers to match (which make it clear this is the right
move).

(Bitbake rev: 783879319c6a4cf3639fcbf763b964e42f602eca)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker/command: Add a dummy event for tinfoil testing</title>
<updated>2021-09-26T15:35:00+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-09-25T10:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2446bdf59aed8b1f600f8cbff239529c61fe12bb'/>
<id>urn:sha1:2446bdf59aed8b1f600f8cbff239529c61fe12bb</id>
<content type='text'>
We need a command genetating an event to test through the tinfoil API. The
current test has IO load issues so add a dummy version which won't have
the IO constraints.

(Bitbake rev: a144178584394ea0700ffc2f2bfac94e8690effc)

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