<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/utils.py, branch 5.2_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-01-11T18:35:01+00:00</updated>
<entry>
<title>bitbake: utils: add Go mod h1 checksum support</title>
<updated>2025-01-11T18:35:01+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2025-01-07T15:15:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f00e8e1233e773d495413ea31000b88f67eb61ba'/>
<id>urn:sha1:f00e8e1233e773d495413ea31000b88f67eb61ba</id>
<content type='text'>
Add support for the Go mod h1 hash. The hash is based on the Go dirhash
package. The package defines hashes over directory trees and is uses for
Go mod files and zip archives.

(Bitbake rev: deefb01592f717efba68e3997fefd04dc7611d88)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Improve multiple lock handling</title>
<updated>2024-10-11T11:17:36+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-10-11T10:58:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ba2fcb968e43bce93a7beb1c5fd9d671460f9fca'/>
<id>urn:sha1:ba2fcb968e43bce93a7beb1c5fd9d671460f9fca</id>
<content type='text'>
We should release locks in the opposite order to the order we locked
them in to avoid potentially problematic behaviour. This hasn't been
observed with our current usage and is just a preventative improvement.

(Bitbake rev: 4fbef87adaca2df8c1e877aec5588c2e5466f252)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: better estimate number of available cpus</title>
<updated>2024-03-22T16:26:45+00:00</updated>
<author>
<name>Felix Moessbauer</name>
<email>felix.moessbauer@siemens.com</email>
</author>
<published>2024-03-13T10:06:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9504df41f9e1c64014436a46abf058c5d3f42d3f'/>
<id>urn:sha1:9504df41f9e1c64014436a46abf058c5d3f42d3f</id>
<content type='text'>
When running in a cgroup which is limited to a subset of cpus (via
cpuset.cpus), cpu_count() should return the number of cpus that can be
used instead of the number of cpus the system has.

This also aligns the semantics with nproc.

(Bitbake rev: a029bfe96c6542f178720c72a772b7ede9898118)

Signed-off-by: Felix Moessbauer &lt;felix.moessbauer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: remove BB_ENV_PASSTHROUGH from preserved_envvars()</title>
<updated>2024-03-05T12:25:08+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-03-04T14:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=be10de34231d2b0081aa0ff7cbc36aef110d7fee'/>
<id>urn:sha1:be10de34231d2b0081aa0ff7cbc36aef110d7fee</id>
<content type='text'>
preserved_envvars() is used when the BB_ENV_PASSTHROUGH
environment variable is not set. Therefore, its code shouldn't
return this variable.

(Bitbake rev: 0a33b560233b983456178541603ab96fea22238b)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Reported-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Tested-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Fix mkdir with PosixPath</title>
<updated>2023-12-17T19:07:21+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-12-17T13:11:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e706249f7b68fdb57b8400d5d09ac4555a0868b5'/>
<id>urn:sha1:e706249f7b68fdb57b8400d5d09ac4555a0868b5</id>
<content type='text'>
Avoid:
    Exception: AttributeError: 'PosixPath' object has no attribute 'find'

(Bitbake rev: 0b37fe89ba12549109905b6d0e6d07d342162436)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Do not create directories with ${ in the name</title>
<updated>2023-12-08T17:17:42+00:00</updated>
<author>
<name>Pavel Zhukov</name>
<email>pavel@zhukoff.net</email>
</author>
<published>2023-12-08T11:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d14eb12deb625e6644c0e727c336ad6bfafd0793'/>
<id>urn:sha1:d14eb12deb625e6644c0e727c336ad6bfafd0793</id>
<content type='text'>
In some cases ${ may not be expanded in the WORKDIR (one of the cases is
undefined variable) and causes cryptic failures [1]. Guard this by
erroring out if directory name contains ${

Fixes: [Yocto #15255]

[1]
ERROR: x-native-1.0+${SRCPV}-r0 do_deploy_source_date_epoch: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:sstate_hardcode_path(d)
     0003:
File: '/home/mischief/src/poky/meta/classes-global/sstate.bbclass', lineno: 654, function: sstate_hardcode_path
     0650:    bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
     0651:    subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir)
     0652:
     0653:        # If the fixmefn is empty, remove it..
 *** 0654:    if os.stat(fixmefn).st_size == 0:
     0655:        os.remove(fixmefn)
     0656:    else:
     0657:        bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
     0658:        subprocess.check_output(sstate_filelist_relative_cmd, shell=True)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/mischief/src/poky/build/tmp/work/core2-64-poky-linux/x-native/1.0+${SRCPV}-r0/sstate-build-deploy_source_date_epoch/fixmepath'

(Bitbake rev: e91c256ec076e70cf8a18e369fe7862e50618c48)

Signed-off-by: Pavel Zhukov &lt;pavel@zhukoff.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: utils: remove spaces on empty lines</title>
<updated>2023-11-20T15:32:25+00:00</updated>
<author>
<name>Julien Stephan</name>
<email>jstephan@baylibre.com</email>
</author>
<published>2023-11-17T11:12:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4d6c63a56c50536806b21cbe72416d8f1b84f589'/>
<id>urn:sha1:4d6c63a56c50536806b21cbe72416d8f1b84f589</id>
<content type='text'>
(Bitbake rev: 979ff8b4228e4c6f90985e9a3faa5fc9f3922218)

Signed-off-by: Julien Stephan &lt;jstephan@baylibre.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: utils: Add path_is_descendant()</title>
<updated>2023-09-14T14:08:21+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2023-09-13T19:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b2ab9bd4a394a60bfb2b21f5cc31b6f3185fc7e5'/>
<id>urn:sha1:b2ab9bd4a394a60bfb2b21f5cc31b6f3185fc7e5</id>
<content type='text'>
Adds a utility that checks if one path is an descendant of another. This
check uses os.path.samestat() to make it immune to symlinks and bind
mounts.

(Bitbake rev: c3ae45946886ee2049939dd5a205790657a7de32)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.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: utils: Use internal fetcher function to avoid duplication</title>
<updated>2023-02-26T11:49:41+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-02-24T15:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c08e2c2e20e89f8d825c19ed3032d27fc0b022dc'/>
<id>urn:sha1:c08e2c2e20e89f8d825c19ed3032d27fc0b022dc</id>
<content type='text'>
We currently have two lists of "proxy" or "fetcher" environment exports.
Make the one in utils match the one on the fetcher which has a more complete
list of variables now.

(Bitbake rev: f9165a798a307a6f0fee120d5c3de660d3a44ae8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bb/utils: include SSL certificate paths in export_proxies</title>
<updated>2023-01-26T21:50:31+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@arm.com</email>
</author>
<published>2023-01-26T16:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b1ec98f71f196bce3042b6432d7767062529f547'/>
<id>urn:sha1:b1ec98f71f196bce3042b6432d7767062529f547</id>
<content type='text'>
bb.utils.export_proxies() is a poor-man's alternative for the
environment setup code in bb/fetch2, but it's used in several places
where recipes want to download manually (such as cve-update-db-native).

Notably, export_proxies() doesn't pass on the SSL certificate paths from
the original environment, so if SSL_CERT_FILE needs to be set (for
example, in a buildtools environment) then proxies work but SSL doesn't.

In an ideal world export_proxies and the same logic in fetch2 would
merge, but until then we can add the SSL_CERT_ variables and duplicate
the basic logic: check the datastore first and then the original
environment for variables.

Also remove the return value as nothing ever checked it.

[ YOCTO #15000 ]

(Bitbake rev: c19035e8e71c419c5688a86bfc9c946c96f638e8)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
