<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/data_smart.py, branch yocto-5.0.12</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-5.0.12</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-5.0.12'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-03-08T14:22:56+00:00</updated>
<entry>
<title>bitbake: data_smart.py: clear expand_cache in _setvar_update_overridevars</title>
<updated>2025-03-08T14:22:56+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2025-02-25T06:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3646348c982f2dbb0d1a47896ca82142e208bdb9'/>
<id>urn:sha1:3646348c982f2dbb0d1a47896ca82142e208bdb9</id>
<content type='text'>
At the end of this function, self.overrides is cleared, which means we'll
construct a new self.overrides after this call. And a new self.overrides
will give out different expand_cache, so the old expand_cache should also
be cleared to avoid any wrong value.

Currently, there's a problem revealed by recent recipe specific virtual
provider patch. If we enable multilib and set "OVERRIDES:prepend" in local.conf,
things don't work.

Here's the error message:

  ERROR: Nothing PROVIDES 'lib32-gcc-cross-x86_64'

Below are reproduce steps:
1. Add in local.conf the following lines:
   MACHINE ?= "qemux86-64"
   require conf/multilib.conf
   MULTILIBS ?= "multilib:lib32"
   DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"
   OVERRIDES:prepend = "some-override:"
   (Note that using :append and :remove also reproduces the issue.)
2. bitbake -n lib32-sysstat
   (bitbake -n core-image-minimal also reproduces the issue)

The expandWithRefs calls getVar, which fills expand_cache. So when setting
OVERRIDES:prepend, this will fill the expand_cache. When overridevars are updated,
if we don't clear expand_cache, we'll retrieve wrong values.

Previously, things happened to work because there's a call to expand
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc, which in turn expands
TARGET_VENDOR. Now what we expand is PREFERRED_PROVIDER_ virtual/cross-cc,
so the problem is revealed.

(Bitbake rev: 7375d32e8c1af20c51abec4eb3b072b4ca58b239)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart.py: simple clean up</title>
<updated>2025-03-08T14:22:56+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2025-02-25T06:48:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=133ac79e70478bc086363042278f99b26700af23'/>
<id>urn:sha1:133ac79e70478bc086363042278f99b26700af23</id>
<content type='text'>
When var matches __setvar_regexp__, which has the value as below,
__setvar_regexp__ = re.compile(r'(?P&lt;base&gt;.*?)(?P&lt;keyword&gt;:append|:prepend|:remove)(:(?P&lt;add&gt;[^A-Z]*))?$')
the keyword will not be __doc__ or __module__ and var will always
contain ":".

(Bitbake rev: 9cac695951d0fd587063b250bfc8ef0f87acad18)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart.py: remove unnecessary ? from __expand_var_regexp__</title>
<updated>2025-03-08T14:22:56+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2025-02-25T06:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d8d82a17eeb75a9703dd4c0dc8264a8895797deb'/>
<id>urn:sha1:d8d82a17eeb75a9703dd4c0dc8264a8895797deb</id>
<content type='text'>
The non-greedy modifier suffix ? is not necessary here because } is
not in the character set [a-zA-Z0-9\-_+./~:].

(Bitbake rev: aae570b7f051fc5deee7a1712a02ed92498a4461)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: Improve performance for VariableHistory</title>
<updated>2024-08-26T12:18:43+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2024-07-28T03:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5bfb7594c47dfe8bc809a7347e5f2e4df2412fa0'/>
<id>urn:sha1:5bfb7594c47dfe8bc809a7347e5f2e4df2412fa0</id>
<content type='text'>
Fixed:
- BBMULTICONFIG = "qemux86-64 qemuarm64" and more than 70 layers in BBLAYERS
$ bitbake -p -P
Check profile.log.processed, the record() cost more than 20 seconds, it is less
than 1 second when multiconfig is not enabled, and there would be the following
error when more muticonfigs are enabled:

Timeout while waiting for a reply from the bitbake server

Don't change the type of loginfo['detail'] or re-assign it can make record()
back to less than 1 second, this won't affect COW since loginfo is a mutable
type.

The time mainly affected by two factors:
1) The number of enabled layers, nearly 1 second added per layer when the
   number is larger than 50.

2) The global var such as USER_CLASSES, about 1 ~ 2 seconds added per layer
   when the layers number is larger than 50.

(Bitbake rev: d251668d9a7a8dd25bd8767efb30d6d9ff8b1ad3)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 0596aa0d5b0e4ed3db11b5bd560f1d3439963a41)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: directly check for methodpool functions in context lookup</title>
<updated>2023-08-04T10:37:56+00:00</updated>
<author>
<name>Christopher Larson</name>
<email>kergoth@gmail.com</email>
</author>
<published>2022-03-17T22:29:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7be82bf66524c9c78ddf798131d1cb38489a14c1'/>
<id>urn:sha1:7be82bf66524c9c78ddf798131d1cb38489a14c1</id>
<content type='text'>
We previously checked for the existence of the 'func' flag to determine
if we should avoid looking up in the metadata. This was done to ensure
the user gets the function for 'def' python functions rather than their
string contents. We can sidestep the metadata lookup and check our
function context directly, instead.

(Bitbake rev: 6cac1eac51efa9a54e8457f60ea1ea0e604c50b7)

Signed-off-by: Christopher Larson &lt;kergoth@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: check for python builtins directly for context lookup</title>
<updated>2023-08-04T10:37:55+00:00</updated>
<author>
<name>Christopher Larson</name>
<email>kergoth@gmail.com</email>
</author>
<published>2022-03-17T22:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8b74f2ca55a08454beee77141dcdfe51e343298a'/>
<id>urn:sha1:8b74f2ca55a08454beee77141dcdfe51e343298a</id>
<content type='text'>
This avoids the need to hardcode a list of python builtins. This also slightly changes behavior, in a case like `${@eval("3")}`, this will ensure we always call the builtin, even if the metadata has an 'eval' variable defined.

(Bitbake rev: 9976ae50677b333d646ca0fd395468bd2301d03f)

Signed-off-by: Christopher Larson &lt;kergoth@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: Small optimisation to _findVar()</title>
<updated>2023-01-24T21:59:44+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-01-21T12:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ea12b673cfe5253c2c3baf3325718156b82cad1b'/>
<id>urn:sha1:ea12b673cfe5253c2c3baf3325718156b82cad1b</id>
<content type='text'>
Some users of _findVar don't need the override data and even
getVarFlag doesn't need it in some common cases (parsing=True).

Rearrange the code as the current overridedata approach doesn't need
to be in the _findVar code anyway. This removes some search overhead
from a critical path.

(Bitbake rev: fcb64e1138a20eb19560af3fc5d1fa748cc9cf34)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: Small cache reuse optimization</title>
<updated>2022-11-29T10:25:51+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-11-28T23:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=43ef392dc2e85c2f298fdb1ee970708c4c2e79f9'/>
<id>urn:sha1:43ef392dc2e85c2f298fdb1ee970708c4c2e79f9</id>
<content type='text'>
Currently the expand cache doesn't work for "parser" return types, which
is the main type used by the build_dependencies() call that we spend most
of the time in when parsing. Tweak the code to cache the unexpanded value
in the expand cache and hence allow reuse of the parser in other fast path
cases for small speed gains.

(Bitbake rev: b4a8e5071dbcba2217b79e83e08b275ffcbc0eef)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: Use regex consistently for override matching</title>
<updated>2022-11-29T10:25:51+00:00</updated>
<author>
<name>张忠山</name>
<email>zzs213@126.com</email>
</author>
<published>2020-09-30T03:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bdc821a4c34464a56d8a934cea23399790288e83'/>
<id>urn:sha1:bdc821a4c34464a56d8a934cea23399790288e83</id>
<content type='text'>
One section of the code is enforcing lowercase overrides, the other
is allowing numeric characters. We should be consistent with one or
the other.

(Bitbake rev: df5b3b841fd8d6a652d643e9ae2bba09d60043e0)

Signed-off-by: 张忠山 &lt;zzs213@126.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: Add debugging for overrides stability issue</title>
<updated>2022-11-27T23:48:15+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-11-24T16:11:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0536965bd45670b7024c84f30a79cd652fe87a73'/>
<id>urn:sha1:0536965bd45670b7024c84f30a79cd652fe87a73</id>
<content type='text'>
If someone is unfortunate enough to run into override recursion issues
they're hard to debug with the existing message. We can at least show the
values that OVERRIDES takes to show there is some problem and aid debugging.

(Bitbake rev: 43035b75201616e7bfd680d3d15c5c0fc7c04eb6)

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