<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/build.py, branch styhead-5.1.4</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=styhead-5.1.4</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=styhead-5.1.4'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-08-15T14:15:10+00:00</updated>
<entry>
<title>bitbake: build/exec_task: Log str() instead of repr() for exceptions in build</title>
<updated>2024-08-15T14:15:10+00:00</updated>
<author>
<name>Troels Dalsgaard Hoffmeyer</name>
<email>tdah@bang-olufsen.dk</email>
</author>
<published>2024-08-09T11:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=67efcf3102b31581cb95f9c4b1a1aedff7464a53'/>
<id>urn:sha1:67efcf3102b31581cb95f9c4b1a1aedff7464a53</id>
<content type='text'>
When getting errors during build, they would be printed using repr(), which
doesnt have a lot of context in some cases.
For example FileNotFoundError(2, "file or directory not found"), would be
printed, without the path of the file not found.
This changes the build logging to use str() instead, which according to
the spec is fore human readable strings, whereas repr() is for string
representations that can be be used as valid python.

(Bitbake rev: 2a97024b8b9245ec47deace011a7560a25491207)

Signed-off-by: Troels Dalsgaard Hoffmeyer &lt;tdah@bang-olufsen.dk&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: build: Ensure addtask before/after tasknames have prefix applied</title>
<updated>2024-08-13T14:47:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-08-12T14:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=997b11a5a12fec2bf43c431052f431edc51c8fe6'/>
<id>urn:sha1:997b11a5a12fec2bf43c431052f431edc51c8fe6</id>
<content type='text'>
"addtask do_XXX before YYY after ZZZ "

where YYY or ZZZ is missing the "do_" prefix don't work as expected. Ajust the
code so that it doesn't just silently do the wrong thing but works as expected.

Expand a test case to cover this.

(Bitbake rev: 21670b9bb8936ec44aedff26163948bbc2ceb44a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build: Handle conflict between cwd and cleandirs</title>
<updated>2024-05-08T13:51:43+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-04-25T15:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ead0ff22104f15838dced0eee402449ef3ca58c5'/>
<id>urn:sha1:ead0ff22104f15838dced0eee402449ef3ca58c5</id>
<content type='text'>
If the cwd of the task is also a cleandirs, you would see warnings from bitbake
about being unable to obtain cwd during the task execution. Tweak the code
to detect this and avoid the warnings.

(Bitbake rev: 6c7fd60c10955b0f23f64b25b5b4e154eb22a8f8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build: Make python output print to stdout when running with -v (verbose)</title>
<updated>2023-03-21T22:44:00+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2023-03-14T19:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=312db493eead16c9ce0a069c0ae5b7496b87b149'/>
<id>urn:sha1:312db493eead16c9ce0a069c0ae5b7496b87b149</id>
<content type='text'>
When tasks are run with -v (verbose) on the bitbake commandline, shell
tasks print their stdout, python tasks do not.

This change redirects the python task's print output to an in memory
buffer. After the task is executed the output is printed to stdout via
the logger. This makes the python task behavior match the shell task
behavior when running with -v. The contents of the task's log files
remain unchanged after this change.

This approach should keep the correct order in most cases, however, if
the python task accesses the logger directly, that content will appear
before other output. On the other hand, this change should negate the
need for python tasks to access the logger directly.

Special care is taken to save/restore the existing stdout and stderr
and preventing sending output directly to the logger when there are
"recursive" calls, for instance when a python function calls a shell
function, avoiding printing things potentially out of order and/or
multiple times.

The logging-test.bb in meta-selftest can be used to review this
change. This has been tested with the full bblogging oeqa tests.

[Yocto #14544]

(Bitbake rev: 81a58647b2f4fc0a2589b2978fc9d81b2bfe6aec)

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build/siggen: Rework stamps functions</title>
<updated>2022-12-17T08:52:28+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-11T16:37:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1a45c29ff13f6e78b9428336f813d0c3e0fd980a'/>
<id>urn:sha1:1a45c29ff13f6e78b9428336f813d0c3e0fd980a</id>
<content type='text'>
The current method of passing either a task's datastore, or
dataCaches and a filename into the stamp functions is rather
horrible.

Due to the different contexts, fixing this is hard but we do control
the bitbake side of the API usage so we can migrate those to use other
functions and then only support a datastore in the public bb.build API
which is only called from task context in OE-Core.

(Bitbake rev: c79ecec580e4c2a141ae483ec0f6448f70593dcf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build/siggen/runqueue: Drop do_setscene references</title>
<updated>2022-12-11T23:21:27+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-10T11:42:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f329142a31f8207240ad93e5c00e9b6bf8dc9745'/>
<id>urn:sha1:f329142a31f8207240ad93e5c00e9b6bf8dc9745</id>
<content type='text'>
do_setscene was from a different era before our modern setscene
per task code. It hasn't been used for years so remove some old
obsolete references to it.

(Bitbake rev: ef72282298f7c4db74383c23bb0251dd06d3c6d3)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data/data_smart/build: Clean up datastore finalize/update_data references</title>
<updated>2022-11-14T16:22:00+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-11-11T14:23:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d8e9ee8fd53b7620e72b2dfebb2e8d464b737dbb'/>
<id>urn:sha1:d8e9ee8fd53b7620e72b2dfebb2e8d464b737dbb</id>
<content type='text'>
We dropped the update_data calls a while ago. Clean up the code
to match the reality and drop the remaining no-op pieces. Update
the comments to reflect the slowest operations and let the cookie
monster's spirit live on!

(Bitbake rev: 584989ed2b5af4e8799571dece0cf94f995ef14e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build: prefix the tasks with a timestamp in the log task_order</title>
<updated>2022-08-12T10:49:29+00:00</updated>
<author>
<name>Jose Quaresma</name>
<email>quaresma.jose@gmail.com</email>
</author>
<published>2022-08-05T09:47:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8a1afec0d592db6f02338d0991e7ede250b53f8e'/>
<id>urn:sha1:8a1afec0d592db6f02338d0991e7ede250b53f8e</id>
<content type='text'>
This is useful when debugging as it helps understand possible
race conditions between tasks of diferent recipes.

(Bitbake rev: 950a2ea4c91d6e13d7587104367fa85cc7efe01c)

Signed-off-by: Jose Quaresma &lt;jose.quaresma@foundries.io&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build: Add clean_stamp API function to allow removal of task stamps</title>
<updated>2022-05-16T22:19:18+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-05-16T10:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b8b3413a9c9898291005b17f13a02e37b0c4c758'/>
<id>urn:sha1:b8b3413a9c9898291005b17f13a02e37b0c4c758</id>
<content type='text'>
We currently have no API to be able to remove all the potential stamps of a
task. It is unusual to need to do this, particularly as you could race against
other things happening in the system but we do have a use case for this in
cleaning up sysroots in OE-Core. The alternative is to mess with CLEANMASK in
OE-Core but that is just going to add potential for errors.

We need the first part of the make_stamp() function so separate that out so
it can be called seperately.

(Bitbake rev: 4d671504a25863018ac51c21c005cef0a4d8f05c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: build: Add missing parameter to TaskInvalid</title>
<updated>2022-03-30T12:05:03+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-29T15:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f6cdd19553e794b2036f592d4f240a11444530b5'/>
<id>urn:sha1:f6cdd19553e794b2036f592d4f240a11444530b5</id>
<content type='text'>
Fixes:

File "bitbake/lib/bb/build.py", line 585, in _exec_task
  event.fire(TaskInvalid(task, d), d)
TypeError: __init__() missing 1 required positional argument: 'metadata'

(Bitbake rev: 16ea4429344e36ff022616abd7fa74e5964b6d6a)

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