<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/data_smart.py, branch 5.2_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-03-06T16:32:47+00:00</updated>
<entry>
<title>bitbake: data_smart.py: clear expand_cache in _setvar_update_overridevars</title>
<updated>2025-03-06T16:32:47+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=b34f84dce855a149a465159e09161ff7a79e65c5'/>
<id>urn:sha1:b34f84dce855a149a465159e09161ff7a79e65c5</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: 842e94234c9b9faf4e902721f516071f643e49c9)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart.py: simple clean up</title>
<updated>2025-03-06T16:32:47+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=c077a12e49029a6873d36ed25fbedb36a35505be'/>
<id>urn:sha1:c077a12e49029a6873d36ed25fbedb36a35505be</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: 0af396917fe176df7b1ed0bd7c7267507ed12e03)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart.py: remove unnecessary ? from __expand_var_regexp__</title>
<updated>2025-03-06T16:32:47+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=27db4f10142cd0612987b3f2139d5d22c17c422d'/>
<id>urn:sha1:27db4f10142cd0612987b3f2139d5d22c17c422d</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: 80735719d0002c02b704a49604ddd82c461203a2)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: fix indentation</title>
<updated>2025-02-25T15:27:28+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2025-02-25T06:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=40b5f61a8f359a428fc0262522d0fd3929e01c15'/>
<id>urn:sha1:40b5f61a8f359a428fc0262522d0fd3929e01c15</id>
<content type='text'>
Fix 8 spaces indentation to be 4 spaces.

(Bitbake rev: 973866d134f0493bb3034593fe03cb8bf8920c5c)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: data_smart: fix ??= operator for variable flags</title>
<updated>2025-02-13T22:24:27+00:00</updated>
<author>
<name>Louis Rannou</name>
<email>louis.rannou@non.se.com</email>
</author>
<published>2025-02-13T15:05:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0a9cfebb3a47b3404d3ff73a58e9f1a88d87fa78'/>
<id>urn:sha1:0a9cfebb3a47b3404d3ff73a58e9f1a88d87fa78</id>
<content type='text'>
Variable flags have been fixed in commit
0329a7e3ac694737f2d2c1861f65492551360663 which introduces the
"_defaultval_flag_" prefix for default values.

This must not be ignored in delVarFlags and getVarFlags.

Fixes [YOCTO #15685]

(Bitbake rev: 2ee079fc1b7cf6d384ca17bd034b0a40461d9d18)

Signed-off-by: Louis Rannou &lt;louis.rannou@non.se.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: fix ??= operator for variable flags</title>
<updated>2025-01-14T09:51:45+00:00</updated>
<author>
<name>Yoann Congal</name>
<email>yoann.congal@smile.fr</email>
</author>
<published>2025-01-11T14:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=052746da9a7e96b43ec45a04322e8576a6cbaab7'/>
<id>urn:sha1:052746da9a7e96b43ec45a04322e8576a6cbaab7</id>
<content type='text'>
??= operator works for variable value by defining a "_defaultval" flag.

Use something similar for flags: For the default value of the flag
"flag_name", define a flag "_defaultval_flag_flagname" that is used when
reading flag_name but no other value has been set.

Fixes [YOCTO #15685]

(Bitbake rev: 0329a7e3ac694737f2d2c1861f65492551360663)

Signed-off-by: Yoann Congal &lt;yoann.congal@smile.fr&gt;
Reviewed-by: Ghislain Mangé &lt;ghislain.mange@smile.fr&gt;
Suggested-by: Ola Nilsson &lt;ola.x.nilsson@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart: Improve performance for VariableHistory</title>
<updated>2024-08-03T10:37:47+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=6568b7aac5493d17ceaf8a9e9e553cce46b026f3'/>
<id>urn:sha1:6568b7aac5493d17ceaf8a9e9e553cce46b026f3</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: 0596aa0d5b0e4ed3db11b5bd560f1d3439963a41)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&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>
</feed>
