<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/utils.py, branch uninative-3.2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-3.2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-3.2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-05-06T10:04:59+00:00</updated>
<entry>
<title>bitbake: lib/bb: Add bb.utils.rename() helper function and use for renaming</title>
<updated>2021-05-06T10:04:59+00:00</updated>
<author>
<name>Devendra Tewari</name>
<email>devendra.tewari@gmail.com</email>
</author>
<published>2021-04-19T14:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=581233a798434f178898f12fa35bbcccb92e7768'/>
<id>urn:sha1:581233a798434f178898f12fa35bbcccb92e7768</id>
<content type='text'>
os.rename can fail for example an incremental build in Docker fails with:

OSError: [Errno 18] Invalid cross-device link

when source and destination are on different overlay filesystems.

Rather than trying to fix every call site, add a wrapper in bb.utils
for renames. We can then handle cross device failures and
fall back to shutil.move. The reason os.rename is still used is
because shutil.move is too slow for speed sensitive sections of code.

[YOCTO #14301]

(Bitbake rev: c5c4e49574ab2a65e06298a0a77bb98b041cf56b)

Signed-off-by: Devendra Tewari &lt;devendra.tewari@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: logging: Make bitbake logger compatible with python logger</title>
<updated>2021-02-10T23:48:16+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2021-02-09T15:50:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=75f87db413f3659fee18eff389b7b339b01cce15'/>
<id>urn:sha1:75f87db413f3659fee18eff389b7b339b01cce15</id>
<content type='text'>
The bitbake logger overrode the definition of the debug() logging call
to include a debug level, but this causes problems with code that may
be using standard python logging, since the extra argument is
interpreted differently.

Instead, change the bitbake loggers debug() call to match the python
logger call and add a debug2() and debug3() API to replace calls that
were logging to a different debug level.

[RP: Small fix to ensure bb.debug calls bbdebug()]
(Bitbake rev: f68682a79d83e6399eb403f30a1f113516575f51)

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: add docstrings to functions</title>
<updated>2021-01-08T10:11:42+00:00</updated>
<author>
<name>Milan Shah</name>
<email>mshah@mvista.com</email>
</author>
<published>2021-01-05T09:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0fa7258d27e64984c41e03580921ebd48eba5a64'/>
<id>urn:sha1:0fa7258d27e64984c41e03580921ebd48eba5a64</id>
<content type='text'>
A list of functions that now has a docstring.
* vercmp_string
* explode_dep_versions
* prunedir
* prune_suffix
* to_boolean
* contains_any
* export_proxies

See [YOCTO #9725] for details.

(Bitbake rev: b61ba4a18693a9e553d2a93161feb0bcc1c82384)

Signed-off-by: Milan Shah &lt;mshah@mvista.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: add umask changing context manager</title>
<updated>2020-09-30T14:03:30+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross@burtonini.com</email>
</author>
<published>2020-09-28T16:18:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f3b0d3eeaefa4ecbc1c31406201ebc03e5bf1588'/>
<id>urn:sha1:f3b0d3eeaefa4ecbc1c31406201ebc03e5bf1588</id>
<content type='text'>
Add a umask context manager which can be used to temporarily change the
umask in a 'with' block.

(Bitbake rev: 6c601e68a27e1c60b04c2a61830d1812cc883e09)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: fix UnboundLocalError when _print_exception raises</title>
<updated>2020-09-10T12:49:21+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2020-09-08T23:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9b2b23d5ec4c9b0031ad9c002ab40e70a49fe71e'/>
<id>urn:sha1:9b2b23d5ec4c9b0031ad9c002ab40e70a49fe71e</id>
<content type='text'>
PEP 3110 changed how exceptions work. 'e' is unbound
after the 'except' clause. See: https://www.python.org/dev/peps/pep-3110/#semantic-changes

(Bitbake rev: b69e97de53eb172ed730993e3b755debaa26f30d)

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: utils.py: get_file_layer(): Improve performance</title>
<updated>2020-09-10T12:49:21+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2020-09-09T11:55:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f738ed43e93eaf971615ef5105ece567f280c85e'/>
<id>urn:sha1:f738ed43e93eaf971615ef5105ece567f280c85e</id>
<content type='text'>
The following code costs a lot of time when there are lot of layers and recipes:

     for collection in collections:
         collection_res[collection] = d.getVar('BBFILE_PATTERN_%s' % collection) or ''

My build has more than 100 layers and 3000 recipes, which calls d.getVar() 300K
(3000 * 100) times and makes 'bitbake-layers show-recipes' very slow, add a
keyword argument to get_file_layer() can fix the problem, it can save about 90%
time in my build (6min -&gt; 40s).

(Bitbake rev: f08a6601c9bb09622855d62e1cedb92fafd2f71d)

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: utils.py: get_file_layer(): Exit the loop when file is matched</title>
<updated>2020-09-10T12:49:21+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2020-09-09T11:55:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f543535e3ca4d86bee10801450dc22f3b5382b4c'/>
<id>urn:sha1:f543535e3ca4d86bee10801450dc22f3b5382b4c</id>
<content type='text'>
This can make "$ bitbake-layers show-recipes" save about 60% time (14min -&gt;
6min) in my build (more than 3000 recipes)

The command "bitbake-layers show-recipes" calls bb.utils.get_file_layer() with
each recipe, and get_file_layer() compare the file with each item in BBFILES
which makes it very time consuming when there are a lot of recipes and items in
BBFILES. So use BBFILES_PRIORITIZED and exit when file is matched, it doesn't
make sense to go on the loop when file is matched.

And use fnmatchcase to replace of fnmatch since the comparison should be
case-sensitive.

(Bitbake rev: 8d64181d29dc262e066a6114dd51e5f2d04f47de)

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: utils: process_profilelog: use context manager</title>
<updated>2020-09-10T12:49:21+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2020-09-09T16:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=926c154eb444c533a2f47a7cdf63667d78d30794'/>
<id>urn:sha1:926c154eb444c533a2f47a7cdf63667d78d30794</id>
<content type='text'>
(Bitbake rev: 42172900af06baeee559d33b150d5febdf8e960a)

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: utils: Drop broken timeout function</title>
<updated>2020-08-26T08:05:38+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-08-25T23:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4965496c4a9f105eb1f9ae7e478e7ec96ee1df7b'/>
<id>urn:sha1:4965496c4a9f105eb1f9ae7e478e7ec96ee1df7b</id>
<content type='text'>
I strongly suspect this function doesn't work with modern python so
and its unused now, drop it.

(Bitbake rev: a3033cea089c66c8b4614e7ee57c166f4262c590)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/utils.py: Do not preserve TERM in the environment</title>
<updated>2020-06-16T22:34:45+00:00</updated>
<author>
<name>Jacob Kroon</name>
<email>jacob.kroon@gmail.com</email>
</author>
<published>2020-06-15T12:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=135cbf0efefdb82c755694d383be598b84dd6b7d'/>
<id>urn:sha1:135cbf0efefdb82c755694d383be598b84dd6b7d</id>
<content type='text'>
The value of TERM is leaking into OE-Core postinst-useradd-${PN} scripts,
which in turn can optionally be monitored by buildhistory. Prune the value in
order to make the OE-Core buildhistory output more deterministic.

(Bitbake rev: 0d5cdd0c0d65f2f81c3af0f3767fee86c4142c3a)

Signed-off-by: Jacob Kroon &lt;jacob.kroon@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
