<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/cache.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-29T20:58:19+00:00</updated>
<entry>
<title>bitbake: codeparser: Allow code visitor expressions to be declared in metadata</title>
<updated>2024-08-29T20:58:19+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-08-28T11:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9a25a38ffe4acb374312ea86fdb0587bcc0f5f57'/>
<id>urn:sha1:9a25a38ffe4acb374312ea86fdb0587bcc0f5f57</id>
<content type='text'>
Allow the metadata to define code visitor expressions which mean that
custom dependencies can be handled in function libraries.

An example is the qa.handle_error function in OE which can set something
like:

"""
def handle_error_visitorcode(name, args):
    execs = set()
    contains = {}
    warn = None
    if isinstance(args[0], ast.Constant) and isinstance(args[0].value, str):
        for i in ["ERROR_QA", "WARN_QA"]:
            if i not in contains:
                contains[i] = set()
        contains[i].add(args[0].value)
    else:
        warn = args[0]
        execs.add(name)
    return contains, execs, warn

handle_error.visitorcode = handle_error_visitorcode
"""

Meaning that it can have contains optimisations on ERROR and WARN_QA
instead of hard dependencies.

One drawback to this solution is the parsing order. Functions with
visitorcode need to be defined before anything else references them
or the visitor code will not function for the earlier references.

(Bitbake rev: 5bd0c65c217394cde4c8e382eba6cf7f4b909c97)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache: Drop unused function</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-12T09:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4eedb58a285bdb6d3620f6ca15396dee14fad354'/>
<id>urn:sha1:4eedb58a285bdb6d3620f6ca15396dee14fad354</id>
<content type='text'>
I can't spot any users of this function and it is poking at variables
inside cooker that could and are about to change so drop it.

(Bitbake rev: 52491808706e9e58b5e6b59d2d792353d77c8b66)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache: Remove invalid symlink for bb_cache.dat</title>
<updated>2024-06-25T10:51:45+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2024-06-24T00:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ac40cb5ee24a8ef44b941c4b9bbf6eec6f61d13c'/>
<id>urn:sha1:ac40cb5ee24a8ef44b941c4b9bbf6eec6f61d13c</id>
<content type='text'>
The bb_cache.dat might be an invalid symlink when error happens, then
os.path.exists(symlink) would return False for it, the invalid symlink
wouldn't be removed and os.symlink can't update it any more.

Use os.path.islink(symlink) can fix the problem.

(Bitbake rev: 1387d7b9ee3f270488f89b29f36f9f240e44accc)

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: cache: Simplify virtualfn2realfn()</title>
<updated>2023-11-23T12:06:06+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2023-11-21T02:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2a2320001e2f4700d144d4c3bc914f8d4f68904d'/>
<id>urn:sha1:2a2320001e2f4700d144d4c3bc914f8d4f68904d</id>
<content type='text'>
Also correct the description of variant2virtual().

(Bitbake rev: d766e9bd22ec6392fbf1694eea5032b9d09f1949)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cooker: Add FILE_LAYERNAME variable containing the layername for a recipe</title>
<updated>2023-05-25T12:16:24+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-05-09T12:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=695998f921b691f196825e9067b6db399d691e53'/>
<id>urn:sha1:695998f921b691f196825e9067b6db399d691e53</id>
<content type='text'>
There are times when it would be useful for code to know which layer
(or collection in old bitbake terms) it is contained within.

Add support for FILE_LAYERNAME to be set by bitbake when parsing a recipe
so that it is possible to determine this. To do it, we need to pass data
from the cooker into the recipe endpoints, since only the top level cooker
information knows about the layer structure which makes the patch a bit
painful.

The idea is that this would make layer overrides possible:

OVERRIDES .= ":layer-${FILE_LAYERNAME}"

which then opens possibilities like:

WARN_QA:append:layer-core = " patch-fuzz"

as an example where OE-Core could enable specific QA tests only for that
specific layer.

(Bitbake rev: 7090a14b0035842112d073acf7f2ed1a01fdeccf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache: Make EXCLUDE_FROM_WORLD boolean</title>
<updated>2023-03-30T09:51:54+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2023-03-27T14:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=178c6e0de8d813edf618f5bd9db4af538470a361'/>
<id>urn:sha1:178c6e0de8d813edf618f5bd9db4af538470a361</id>
<content type='text'>
Fixed:
Set EXCLUDE_FROM_WORLD = "0" in recipe_A:
$ bitbake world -g

Check pn-buildlist, the recipe_A won't be built, this patch fixes the problem:
EXCLUDE_FROM_WORLD = "1": Not build in world
EXCLUDE_FROM_WORLD = "0": Add back to world build

(Bitbake rev: 3f4ede2d67a2d75d3faf8887f90371bd7554d492)

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: cache/codeparser: Switch to a new BB_CACHEDIR variable for cache location</title>
<updated>2023-01-26T21:50:31+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-11-30T22:28:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=557aab215884d10839fa24f797890c99f38e97b2'/>
<id>urn:sha1:557aab215884d10839fa24f797890c99f38e97b2</id>
<content type='text'>
Currently the codeparser cache is set from CACHE, which is typically in
bitbake.conf which means we can't read/write any cache until it is found/read.
We may well have python expressions to parse before that happens.
The net result is suboptimal functioning of the codeparser cache since it will
often be invalidated by data that is never written.

This patch changes the codeparser and filechecksum caches to use BB_CACHE as
their setting and defaults it to ${TOPDIR}/cache.

The patch doesn't change where the "persistent" data such as prserver and
hash-equiavalance resides (PERSISTENT_DIR) or where the metadata parsing
cache resists (still currently CACHE). I've left those for a later patch.

The patch does ensure data parsed by the core datastore parsing calls is
written back since this is now much more useful after this change.

(Bitbake rev: ee89ade5b5a4cf9c53f336d8b800e06fbe436628)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache: Only write files if we have data</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-21T19:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4a94cf21c5538232a4ca32cd249794933e31818b'/>
<id>urn:sha1:4a94cf21c5538232a4ca32cd249794933e31818b</id>
<content type='text'>
By writing the cache files only if there is data to write, we can save a
bit of time.

(Bitbake rev: abeff1f80bb1c690b92d535d472dff9df7a56067)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache: Drop reciever side counting for SiggenRecipeInfo</title>
<updated>2022-12-30T15:07:19+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-28T14:15:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=42487f069b0b6212a140ddbc92b9c586f6940dc2'/>
<id>urn:sha1:42487f069b0b6212a140ddbc92b9c586f6940dc2</id>
<content type='text'>
Joshua Watt pointed out maintaining the counting on both sides of the
connection isn't needed. Remove the receiver side counting and simplify
the code, also allowing errors if the counts do go out of sync.

(Bitbake rev: aeacfd391903fe68ae600470fc2bbad0502d401e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: cache/siggen: Fix cache issues with signature handling</title>
<updated>2022-12-29T00:05:45+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-12-28T13:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6549f58cd6e22b4c345212237e81e68e12dfcb61'/>
<id>urn:sha1:6549f58cd6e22b4c345212237e81e68e12dfcb61</id>
<content type='text'>
There is a bug in the current cache code where the restored data structures
were "inverted" leading to some very weird issues, not sure how anything worked
like that, this patch fixes it.

Also fix some issues with multiconfig cache ordering problems by resetting
the stream counters when appropriate.

(Bitbake rev: cd06beb948eff5eaf2d474f5b127d51a61b0b2ef)

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