<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/siggen.py, branch kirkstone-4.0.22</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=kirkstone-4.0.22</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=kirkstone-4.0.22'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-02-17T15:05:08+00:00</updated>
<entry>
<title>bitbake: bitbake-diffsigs: break on first dependent task difference</title>
<updated>2023-02-17T15:05:08+00:00</updated>
<author>
<name>Schmidt, Adriaan</name>
<email>adriaan.schmidt@siemens.com</email>
</author>
<published>2022-05-06T12:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9940cd4d8d7b424ec209a446519dd97c3840dcd4'/>
<id>urn:sha1:9940cd4d8d7b424ec209a446519dd97c3840dcd4</id>
<content type='text'>
compare_sigfiles() recursively calculates differences on all dependent
tasks with changed hashes. This is done in arbitrary/alphabetical order, and
only the last of those results is returned, while everything else is discarded.

This changes the behavior to instead return the first difference and not calculate
any more, which significantly speeds up diffs of tasks with many dependencies.

(Bitbake rev: 89f13cd4a927a73de98998c27082c63b07671525)

Signed-off-by: Adriaan Schmidt &lt;adriaan.schmidt@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit ea6a676c9aa2864c2eff40eea41ba09ce903a651)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Fix inefficient string concatenation</title>
<updated>2023-02-17T15:05:08+00:00</updated>
<author>
<name>Etienne Cordonnier</name>
<email>ecordonnier@snap.com</email>
</author>
<published>2023-02-01T14:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b643d2bc178efab1a192d2db3e2ea99e9c3e5dde'/>
<id>urn:sha1:b643d2bc178efab1a192d2db3e2ea99e9c3e5dde</id>
<content type='text'>
As discussed in https://stackoverflow.com/a/4435752/1710392 , CPython
has an optimization for statements in the form "a = a + b" or "a += b".
It seems that this line does not get optimized, because it has a form a = a + b + c:
data = data + "./" + f.split("/./")[1]

For that reason, it does a copy of data for each iteration, potentially copying megabytes
of data for each iteration.

Changing this line causes SignatureGeneratorBasic::get_taskhash to take 0.06 seconds
instead of 45 seconds on my test setup where SRC_URI points to a big directory.

Note that PEP8 recommends explicitely not to use this optimization which is specific to CPython:
"do not rely on CPython’s efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b"

However, the PEP8 recommended form using "join()" also does not avoid the copy and takes 45 seconds in my test setup:
data = ''.join((data, "./", f.split("/./")[1]))

I have changed the other lines to also use += for consistency only, however those were in the form a = a + b
and were optimized already.

Co-authored-by: JJ Robertson &lt;jrobertson@snap.com&gt;
(Bitbake rev: 590ae6fde9da75db3a368e5c0d47920696c33ebf)

Signed-off-by: Etienne Cordonnier &lt;ecordonnier@snap.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 195750f2ca355e29d51219c58ecb2c1d83692717)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Add copyright headers where missing</title>
<updated>2022-10-11T20:57:28+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-08-10T19:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0ac71c5480e2226e3e6993ca2b30bbdf64813226'/>
<id>urn:sha1:0ac71c5480e2226e3e6993ca2b30bbdf64813226</id>
<content type='text'>
Where copyright headers were not present, add them to make things
clear.

(Bitbake rev: e591325b2bd901c381003deb96a7b32a7148e93e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 1aa338a216350a2751fff52f866039343e9ac013)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Fix insufficent entropy in sigtask file names</title>
<updated>2022-10-11T20:57:28+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2022-08-03T14:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ace871c199796a5ed730a3a95eae5bb26e342b03'/>
<id>urn:sha1:ace871c199796a5ed730a3a95eae5bb26e342b03</id>
<content type='text'>
Signature generation uses mkstemp() to get a file descriptor to a unique
file and then write the signature into it. However, the unique file name
generation in glibc is based on the system timestamp, which means that
with highly parallel builds it is more likely than one might expect
expected that a conflict will occur between two different builder nodes.
When operating over NFS (such as a shared sstate cache), this can cause
race conditions and rare failures (particularly with NFS servers that
may not correctly implement O_EXCL).

The signature generation code is particularly susceptible to races since
a single "sigtask." prefix used for all signatures from all tasks, which
makes collision even more likely.

To work around this, add an internal implementation of mkstemp() that
adds additional truly random entropy to the file name to eliminate
conflicts.

(Bitbake rev: 63bb5591e833de0e7b552963ad9bc4b39e56fda9)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
(cherry picked from commit 97955f3c1c738aa4b4478a6ec10a08094ffc689d)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Drop pointless break statement</title>
<updated>2022-05-12T12:41:42+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-05-10T18:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5eb655e42b599eb34ccea3e8c56b0f475a5227f2'/>
<id>urn:sha1:5eb655e42b599eb34ccea3e8c56b0f475a5227f2</id>
<content type='text'>
(Bitbake rev: f9b563dc02535b594975ac0f5dab8e12d11a6ce0)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 42809f6acb79e39042e81d54c28efb92b7481e44)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake-diffsigs: make finding of changed signatures more robust</title>
<updated>2022-04-14T08:48:33+00:00</updated>
<author>
<name>Schmidt, Adriaan</name>
<email>adriaan.schmidt@siemens.com</email>
</author>
<published>2022-04-12T07:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=33b929192e78b09dfb1ea84c76db2eae4ce444a1'/>
<id>urn:sha1:33b929192e78b09dfb1ea84c76db2eae4ce444a1</id>
<content type='text'>
In `runtaskhashes`, the keys contain the absolute paths to the recipe. When
working with shared sstate caches (where these absolute paths can be different)
we see that compare_sigfiles does not identifiy a changed hash of a dependent
task as "changed", but instead as "removed"&amp;"added", preventing the function
from recursing and continuing the comparison.

By calling `clean_basepaths` before comparing the `runtaskhashes` dicts, we
avoid this.

(Bitbake rev: 7358378b90b68111779e6ae72948e5e7a3de00a9)

Signed-off-by: Adriaan Schmidt &lt;adriaan.schmidt@siemens.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: siggen: Add missing reset handler to hashserv signature generator</title>
<updated>2022-03-26T09:27:43+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-25T09:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f0c28dddbe31dac627eaa31ddb1ed21706005a0b'/>
<id>urn:sha1:f0c28dddbe31dac627eaa31ddb1ed21706005a0b</id>
<content type='text'>
When we have a client connection, we should close that connection when reset()
is called on the siggen. Add the missing function.

(Bitbake rev: 770b4ea81b6126b0830e51649c40f7a46c64132a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker/siggen: Support exit calls and use for hashserv client</title>
<updated>2022-03-26T09:27:43+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-24T23:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=88fcf8422dd04372d73aacfef0ee50de09ef41bd'/>
<id>urn:sha1:88fcf8422dd04372d73aacfef0ee50de09ef41bd</id>
<content type='text'>
We have shutdown functions within the async client code but the siggen
doesn't currently call them. We notice on python 3.10 (such as on fedora35)
that at exit, there is a stray asyncio process left behind. Usually this
doesn't cause problems but it could potentially be a cause of a hang.

For general cleanliness and completness, add in hooks to call the exit handler.

(Bitbake rev: 9ee3fb95330003878fbd64b3ce8897aad96fcd0f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Improve ambiguous use of 'dependent'</title>
<updated>2022-03-23T12:14:46+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-22T17:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d303f9c6ed5316ce8b750a413553ee462e1d20c2'/>
<id>urn:sha1:d303f9c6ed5316ce8b750a413553ee462e1d20c2</id>
<content type='text'>
I'd never spotted this until it was pointed out but the task isn't dependent,
it is a dependency. Fix this confusing reference.

(Bitbake rev: 93395559c9dda734a3dec9ffd9bb2156a71a2c17)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Replace remaining "abort" usage</title>
<updated>2022-02-21T23:37:26+00:00</updated>
<author>
<name>Scott Murray</name>
<email>scott.murray@konsulko.com</email>
</author>
<published>2022-02-17T22:09:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f7fccbe289c216b5bee7336d433589192f9cb6b0'/>
<id>urn:sha1:f7fccbe289c216b5bee7336d433589192f9cb6b0</id>
<content type='text'>
In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

replace the remaining usage of "abort" in documentation, error
messages, and comments with halt/fail/exit as appropriate.
A couple of external Javascript API calls in Toaster remain, as
they cannot currently be changed.

(Bitbake rev: bc27762bf3ffb4a20b58eace5302438c4a526626)

Signed-off-by: Scott Murray &lt;scott.murray@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
