<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/utils.py, branch yocto-3.1.21</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.1.21</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-3.1.21'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-11-22T23:26:15+00:00</updated>
<entry>
<title>bitbake: utils: Fix lockfile path length issues</title>
<updated>2022-11-22T23:26:15+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-23T14:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2b7d97af746e4713036050e730d28b9b13a3c4a2'/>
<id>urn:sha1:2b7d97af746e4713036050e730d28b9b13a3c4a2</id>
<content type='text'>
If the path to bitbake.lock is in a deep directory, bitbake will hang. The
reason was that the max file length limiting code (to 255 chars) was including
the directory name and it should only act on the filename within the directory.
Fix it to just use the base filename.

[YOCTO #14766]

(Bitbake rev: e3db9c2e9eded3c5cb6040714a6054b44f6b3880)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 89d70e7b71eecfe06592202f326e566c579ba01d)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Handle lockfile filenames that are too long for filesystems</title>
<updated>2022-11-22T23:26:15+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-11-18T13:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0711fd83cdc230d04144cda37a786b6470a78f37'/>
<id>urn:sha1:0711fd83cdc230d04144cda37a786b6470a78f37</id>
<content type='text'>
The fetcher mirror code can go crazy creating lock filenames which exceed the
filesystem limits. When this happens, the code will loop/hang.

Handle the filename too long exception correctly but also truncate lockfile
lengths to under 256 since the worst case situation is lockfile overlap
and lack of parallelism.

(Bitbake rev: 30d42ef030d03e11322b6b05ea7bbb64ab3d6f21)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 63baf3440b16e41ac6601de21ced94a94bdf1509)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Pass lock argument in fileslocked</title>
<updated>2022-09-02T10:45:35+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2022-08-30T15:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=87377eacc0a9b17be3ba69efe11f54bbd93fdc79'/>
<id>urn:sha1:87377eacc0a9b17be3ba69efe11f54bbd93fdc79</id>
<content type='text'>
Pass additional arguments in the fileslocked() context manager to the
underlying lockfile() function. This allows the context manager to be
used for any types of locks (non-blocking, shared, etc.) that the
lockfile() function supports.

(Bitbake rev: 048d682b031644fb9f0d41a489bacb873aa27bd7)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Update to use exec_module() instead of load_module()</title>
<updated>2022-01-17T21:53:07+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-01-13T14:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cbc25057f1b4c9be4dff300817478500c37dc48c'/>
<id>urn:sha1:cbc25057f1b4c9be4dff300817478500c37dc48c</id>
<content type='text'>
This is deprecated in python 3.12 and Fedora 35 is throwing warnings so
move to the new functions.

(Bitbake rev: e84c9aa77b61e48f1507edcba7bde65295f4d3ad)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 68a18fbcb5959e334cf307d7fa8dc63832edb942)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/utils.py: Preserve ownership of symlink</title>
<updated>2020-02-22T23:57:26+00:00</updated>
<author>
<name>Daisuke Yamane</name>
<email>daisuke.yamane@cybertrust.co.jp</email>
</author>
<published>2020-02-22T06:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2070441607c1315bf3a161968963d7ca979199a0'/>
<id>urn:sha1:2070441607c1315bf3a161968963d7ca979199a0</id>
<content type='text'>
Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13806

Uncomment lchown() to preserve ownership of symlink.

(Bitbake rev: 6a0b6dd17c6d842960d448114b252e92c55dea33)

Signed-off-by: Daisuke Yamane &lt;daisuke.yamane@cybertrust.co.jp&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: add is_semver function</title>
<updated>2020-01-27T16:48:10+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bd184ea6ff09f9d5b47ac1b3d1140bc34aa420f2'/>
<id>urn:sha1:bd184ea6ff09f9d5b47ac1b3d1140bc34aa420f2</id>
<content type='text'>
This function checks if a string is a semantic version:
    https://semver.org/spec/v2.0.0.html

The npm fetcher needs this function to validate its version parameter.

(Bitbake rev: 61ac4e825fa7afbb76282030586abc9ee4ac215c)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: add sha384_file and sha512_file functions</title>
<updated>2020-01-27T16:48:10+00:00</updated>
<author>
<name>Jean-Marie LEMETAYER</name>
<email>jean-marie.lemetayer@savoirfairelinux.com</email>
</author>
<published>2020-01-24T17:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bdcd68f092bcd803f08524c30c99e2a082462fd1'/>
<id>urn:sha1:bdcd68f092bcd803f08524c30c99e2a082462fd1</id>
<content type='text'>
The npm fetcher needs these functions to support the subresource
integrity: https://www.w3.org/TR/SRI/

(Bitbake rev: 80e2216e2b41cb6170292009064864449bc48bbe)

Signed-off-by: Jean-Marie LEMETAYER &lt;jean-marie.lemetayer@savoirfairelinux.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bb.utils: add get_referenced_vars</title>
<updated>2020-01-19T13:31:05+00:00</updated>
<author>
<name>Chris Laplante via bitbake-devel</name>
<email>bitbake-devel@lists.openembedded.org</email>
</author>
<published>2020-01-17T19:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d5b3b76a71e69297dd4697d6a420f79752da5e5a'/>
<id>urn:sha1:d5b3b76a71e69297dd4697d6a420f79752da5e5a</id>
<content type='text'>
Given a start expression, bb.utils.get_referenced_vars returns the
referenced variable names in a quasi-BFS order (variables within the
same level are ordered aribitrarily).

For example, given an empty data store:

    bb.utils.get_referenced_vars("${A} ${B} ${d.getVar('C')}", d)

returns either ["A", "B", "C"], ["A", "C", "B"], or another
permutation.

If we then set A = "${F} ${G}", then the same call will return a
permutation of [A, B, C] concatenated with a permutation of [F, G].

This method is like a version of d.expandWithRefs().references that
gives some insight into the depth of variable references.

(Bitbake rev: 076eb5453ca35b8b75b8270efb989d5208095b27)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib: remove unused imports</title>
<updated>2020-01-19T13:31:05+00:00</updated>
<author>
<name>Frazer Clews</name>
<email>frazer.clews@codethink.co.uk</email>
</author>
<published>2020-01-16T16:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0ac5174c7d39a3e49893df0d517d47bec1935555'/>
<id>urn:sha1:0ac5174c7d39a3e49893df0d517d47bec1935555</id>
<content type='text'>
removed unused imports which made the code harder to read, and slightly
but less efficient

(Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697)

Signed-off-by: Frazer Clews &lt;frazer.clews@codethink.co.uk&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bb.utils.fileslocked: don't leak files if yield throws</title>
<updated>2019-12-16T23:27:14+00:00</updated>
<author>
<name>Chris Laplante via bitbake-devel</name>
<email>bitbake-devel@lists.openembedded.org</email>
</author>
<published>2019-12-10T19:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e7f8c836f679f0d16dfa7390d58523ff473bb654'/>
<id>urn:sha1:e7f8c836f679f0d16dfa7390d58523ff473bb654</id>
<content type='text'>
Discovered with a recipe under devtool. The ${S}/singletask.lock file (added by
externalsrc.bbclass) was leaked, giving a warning like:

  WARNING: &lt;PN&gt;+git999-r0 do_populate_lic: /home/laplante/yocto/sources/poky/bitbake/lib/bb/build.py:582: ResourceWarning: unclosed file &lt;_io.TextIOWrapper name='/home/laplante/yocto/build/workspace/sources/&lt;PN&gt;/singletask.lock' mode='a+' encoding='UTF-8'&gt;
    exec_func(task, localdata)

(Bitbake rev: 6beddf6214e22b4002626761031a9e9d34fb04db)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
