<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/siggen.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-02-24T15:38:24+00:00</updated>
<entry>
<title>bitbake: lib/bb/siggen: fix debug() call</title>
<updated>2023-02-24T15:38:24+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2023-02-22T16:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9b0277c3c3be7637e7cee2d2a04f67cb00ac0226'/>
<id>urn:sha1:9b0277c3c3be7637e7cee2d2a04f67cb00ac0226</id>
<content type='text'>
Bitbake f68682 changed the logger's debug() method to be compatible with
logging.debug(), but this caller was still using the old API where you
can pass an integer as the first argument:

WARNING: Invalid arguments in bbdebug: (1, 1, 'Found unihash[...]')

Instead, call bbdebug() which has the priority argument.

(Bitbake rev: 18d4f9e8387f7994cf6d46300e25dda1c3a593b2)

Signed-off-by: Ross Burton &lt;ross.burton@arm.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-04T17:03:15+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=edb60ef6fd49764174d140ccae04fca65db131e0'/>
<id>urn:sha1:edb60ef6fd49764174d140ccae04fca65db131e0</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: 195750f2ca355e29d51219c58ecb2c1d83692717)

Signed-off-by: Etienne Cordonnier &lt;ecordonnier@snap.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Minor code improvement</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-20T11:44:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fafce983635a88fd9bb5a1afdbc06d8b90b393b5'/>
<id>urn:sha1:fafce983635a88fd9bb5a1afdbc06d8b90b393b5</id>
<content type='text'>
Tweak the code to remove duplication and only set if the attribute isn't
already there to avoid overwriting.

(Bitbake rev: 513e6c4e9233e0d0bc31e1169077fdbf9aaf4ec3)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Clarify which fn is meant</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-11T17:56:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a225aa3ec4726161172ca4b03d02751b1250e7ae'/>
<id>urn:sha1:a225aa3ec4726161172ca4b03d02751b1250e7ae</id>
<content type='text'>
"fn" can mean different things in bitbake, we added support for class
extensions and then mutlticonfigs by extending it. In siggen, it generally
means that mc is prefixed to it and that it is a virtual filename.

Replace "fn" with "mcfn" in the code to make this clearer as if I'm getting
confused, everyone else likely is as well. "mcfn" is sometimes referred
to as taskfn as well but mcfn is probably the easiest to understand as the
taskname isn't included.

(Bitbake rev: e1c1139ab90f8da1b5036db11d943daefbe87859)

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: siggen: Add dummy dataCaches from task context/datastore</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:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=878de40a501089048cffdc867b2ae1ad8a2ec9e5'/>
<id>urn:sha1:878de40a501089048cffdc867b2ae1ad8a2ec9e5</id>
<content type='text'>
One of the challenges in maintaining the code is that it sometimes uses
a datacaches structure and sometimes a datastore. Rather than continue
the current dual API madness, have the worker contexts create a dummy
datacaches structure with the entries we need. Whilst this does need to
be kept in sync with the real structure, that doesn't change and this
allows the code to be simplified.

With this new approach, we can unify the stamps dependency code again.

(Bitbake rev: c6d325fc9b53e9d588ab273ee3c2a99a70fba42c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: siggen/runqueue: Switch to using RECIPE_SIGGEN_INFO feature for signature dumping</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-09T15:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2946c56b233370ac4b151558079f2fc676157bad'/>
<id>urn:sha1:2946c56b233370ac4b151558079f2fc676157bad</id>
<content type='text'>
Now that we have cache support for the taskdep/gendep/lookupcache data,
we can switch to use that cooker feature and skip the secondary reparse to
write the sig files. This does make the initial parse longer but means the
secondary one isn't needed.

At present parsing with the larger cache isn't optimal but we have plans
in place which will make this faster than the current reparse code being
removed here.

(Bitbake rev: 5951b5b56449855bc2a30146af65eb287a35fcef)

(Bitbake rev: 1252e5bce51ae912ecff9dcc354a371786ff2c72)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: siggen: Directly store datacaches reference</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-09T17:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4754b1021ebdc8272b324bb8f2ffff03c8719233'/>
<id>urn:sha1:4754b1021ebdc8272b324bb8f2ffff03c8719233</id>
<content type='text'>
It is becomming clear the siggen needs access to our cache data but we
can't always obtain it in the contexts we need to. Add it directly,
meaning over time we should be able to simplify the APIs and stop
convoluting new ones!

(Bitbake rev: 6b213590ed0e77683cf7fbce6bbe9605ddecf3d3)

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: siggen: Drop non-multiconfig aware siggen support</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-09T17:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a40875b7271cc1737cc42b14e185ce4a63662036'/>
<id>urn:sha1:a40875b7271cc1737cc42b14e185ce4a63662036</id>
<content type='text'>
All siggens in common use should now support multiconfig, drop the
compatibility code.

(Bitbake rev: b36545b4df6d935ed312ff407d4e0474c3ed8d1a)

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