Commit Graph

568 Commits

Author SHA1 Message Date
Joshua Watt
6c7c9b1146 bitbake: asyncrpc: Add context manager API
Adds context manager API for the asyncrcp client class which allow
writing code that will automatically close the connection like so:

    with hashserv.create_client(address) as client:
       ...

Rework the bitbake-hashclient tool and PR server to use this new API to
fix warnings about unclosed event loops when exiting

(Bitbake rev: ee090484cc25d760b8c20f18add17b5eff485b40)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d01d684a0f6398270fe35ed59b7d28f3fd9b7e41)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 05:14:16 -10:00
Peter Kjellerstedt
0207478c7b bitbake: bitbake-getvar: Make --quiet work with --recipe
Initializing Tinfoil with setup_logging = False only has an effect when
recipe parsing is not needed. To make it work regardless of if --recipe
is used, manipulate the quiet parameter to Tinfoil.prepare() instead.

(Bitbake rev: 161ab0d5bab74732e12d490cee50e14295be0a9f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 71ee69a20f21f3d37f4f060a7d8e87d9f1dc6aa1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-09 04:41:17 -10:00
Etienne Cordonnier
3a3afebf41 bitbake: bitbake-worker/runqueue: Avoid unnecessary bytes object copies
declaring queue=b"" creates an object of types bytes().
bytes() is an immutable object, and therefore doing "self.queue = self.queue + r"
creates a new object containing "self.queue" concatenated with "r".

On my test setup, we are passing 180MB of data of "workerdata" to the bitbake-worker,
so those copies significantly slow down the initialization of the bitbake-worker.

Rather use bytearray() which a mutable type, and use extend() to avoid copies.
In my test setup, byterray.extend() is 10.000 times faster than copying the queue,
for a queue size of 180MB.

(Bitbake rev: 9993a89e5b97dda5f3657e5a7cc3a4fa94ff7111)

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-18 05:13:24 -10:00
Paulo Neves
222be3e3b9 bitbake: bitbake-getvar: Add a quiet command line argument
bitbake-getvar does not have a way to silence bitbake
server's logger and that makes the tool hard to use for
text processing. This is especially true when one wants to
get a bitbake value to be piped to some other utility and
instead we get uncontrolled logging messages or warnings
together with bitbake's variable value.

Example without quiet:
bitbake-getvar --value MACHINE
NOTE: Starting bitbake server...
qemux86-64

With quiet:
bitbake-getvar --value MACHINE --quiet
qemux86-64

(Bitbake rev: d677daa0770c66010fc4ed0af5bbbb94752ba590)

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit af354e975d0b4c26d0e91e3c82946b093bc11b45)
Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-18 05:13:24 -10:00
Alexander Kanavin
7fdfb828fd bitbake: bitbake-layers: initialize tinfoil before registering command line arguments
Plugins may want to use it (e.g. the layers-setup plugin that would
want to discover writer sub-plugins with it), and so it makes sense
to make tinfoil available a bit eariler.

(Bitbake rev: 41b6684489d0261753344956042be2cc4adb0159)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2f6c7523a622f59ddf84a1a196927492bc5fa7a2)
Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-04 04:43:41 -10:00
Frank de Brabander
ee5ff08d87 bitbake: bin/utils: Ensure locale en_US.UTF-8 is available on the system
Get rid of the duplicate code and add extra check that the
locale en_US.UTF-8 is available on the system. This new helper
method is now located right above the method filter_environment()
which sets LC_ALL environment variable to 'en_US.UTF-8'.

[YOCTO #10165]

(Bitbake rev: 0c6f86b60cfba67c20733516957c0a654eb2b44c)

Signed-off-by: Frank de Brabander <debrabander@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a4ce040a6fd540a1cac52f808f909f9fcf8c961c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-04-26 04:03:21 -10:00
Marius Kriegerowski
f0d06b5563 bitbake: bitbake-diffsigs: Make PEP8 compliant
This ignores flake8 rules:
  * E402 module level import not at top of file
  * E501 line too long

(Bitbake rev: 60e05043f83c73a34cd154193e5c40d18a3ed3db)

Signed-off-by: Marius Kriegerowski <marius.kriegerowski@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e8b176de448dc387c7a578c92b52aef28591038f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-17 15:05:08 +00:00
Richard Purdie
0ac71c5480 bitbake: bitbake: Add copyright headers where missing
Where copyright headers were not present, add them to make things
clear.

(Bitbake rev: e591325b2bd901c381003deb96a7b32a7148e93e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1aa338a216350a2751fff52f866039343e9ac013)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-11 21:57:28 +01:00
Richard Purdie
e7566693ed bitbake: bitbake: Bump to version 2.0.0
With the upcoming LTS, it is time we changed the bitbake version so
move to 2.0.

(Bitbake rev: 9a13bf8e20b1841ec99281d45be4c4fc1118438c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 17:51:14 +00:00
Richard Purdie
66998aeec8 bitbake: bitbake: Bump version to 1.53.1
(Bitbake rev: 4a7fb394a2f148517c36cf36bfd8f2be707efb27)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:26 +00:00
Scott Murray
f7fccbe289 bitbake: bitbake: Replace remaining "abort" usage
In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

replace the remaining usage of "abort" in documentation, error
messages, and comments with halt/fail/exit as appropriate.
A couple of external Javascript API calls in Toaster remain, as
they cannot currently be changed.

(Bitbake rev: bc27762bf3ffb4a20b58eace5302438c4a526626)

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:26 +00:00
Scott Murray
8e5a8a2b53 bitbake: bitbake: Rename environment filtering variables
In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

rename:

BB_ENV_WHITELIST -> BB_ENV_PASSTHROUGH
BB_ENV_EXTRAWHITE -> BB_ENV_PASSTHROUGH_ADDITIONS

(Bitbake rev: fe60627839d4280cf0117ed1afbfccdff1181b6a)

(Bitbake rev: 87104b6a167188921da157c7dba45938849fb22a)

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-21 23:37:26 +00:00
Richard Purdie
ebfa1700f4 bitbake: fetch2/cooker: Fix source revision handling with floating upstreams
Where a git url uses a tag instead of a full source revision, breakage
can currently occur in builds. Issues include:

* the revision being looked up in multiple tasks (fetch and unpack)
* the risk a different revision may be obtained in those tasks
* that some tasks may not be allowed to access the network
* that a revision may not be consistent throughout a given build
* rerunning a specific task may given inconsistent results

To fix this, stop the workers from cleaning out the source revision store. This
should only be done in the cooker itself (based on current policy).

Also, where the code "sees" an upstream access, mark the recipe as not to be
cached. The reparse re-triggers the upstream lookup by the server.

Add a test to ensure that if get_srcrev isn't called, the user is told they're
using a configuration that is known to break.

(Bitbake rev: 4b5eed1626709ef3dc06b32fd55d40a2a6edd179)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-17 17:51:03 +00:00
Robert Yang
d77178e8df bitbake: bitbake: bitbake-worker: Preserve network non-local uid
The NIS can't work when network is dissable, so preserve network for it, the
error is like:

do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable

Note, enable nscd on the build machine might be a solution, but that isn't
reliable since it depends on whether the network function has been cached or
not.

(Bitbake rev: 4eafae7904bae6e5c6bc50356e8a9077f2e207fa)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-01 07:31:48 +00:00
Richard Purdie
607f7b2844 bitbake: bitbake-worker: Add/support network task flag
This patch changes behaviour. After this change any task which does not
have the network flag set will have networking disabled on systems that
support that (kernel version dependent).

Add a "network" task specific flag which then triggers networking to
be enabled for this task, it is otherwise disabled.

This needs to happen before we enter the fakeroot environment of the task
due to the need for the real uid/gid which we save in the parent process.

(Bitbake rev: 0746b6a2a32fec4c18bf1a52b1454ca4c04bf543)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-12 21:10:24 +00:00
Richard Purdie
9abab49f2b bitbake: lib/bb: Clean up use of len()
(Bitbake rev: bbbc843e86639604d00d76b1949b94a78cf1d95d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-03 10:12:42 +00:00
Richard Purdie
b6b863311f bitbake: bitbake: Bump to post release verion 1.53.0
(Bitbake rev: 17d74fc64003770a94dfffa2ab102254fa52d585)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-26 14:03:45 +01:00
Richard Purdie
b8be48c718 bitbake: bitbake-worker: Add debug when unpickle fails
We occasionally see bitbake-worker failing and from the logs, an unpickle error
occurs. Add more debug so we can further debug this next time it fails.

[YOCTO #14595]

(Bitbake rev: fe8105cc06beca8240b76ea366a1eff5aa9c5412)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-17 11:57:27 +01:00
Richard Purdie
5cd1fd86f4 bitbake: bitbake-worker: Set BB_CURRENTTASK earlier
For some debugging, BB_CURRENTTASK is set too late to be useful as
it isn't present in some event handlers for example. There is no
other way to know which task is actually running so set the value
earlier.

(Bitbake rev: 7daaaaa27f55b5a458656857c6d61a51b34a62fe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 22:37:43 +01:00
Richard Purdie
156767d3ed bitbake: bitbake: Bump to version 1.52.0
(Bitbake rev: c78ebac71ec976fdf27ea24767057882870f5c60)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-11 11:06:18 +01:00
Richard Purdie
a9fbdd9b24 bitbake: bitbake-worker: Handle pseudo shutdown in Ctrl+C case
If the build is interrupted, handle the shutdown of pseudo even in this
case to avoid data corruption inside docker containers.

[YOCTO #14555]

(Bitbake rev: a2a04c6fe94bc56efcff299c669a151746e35916)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-08 16:45:06 +01:00
Richard Purdie
eab1c2087f bitbake: bitbake-worker: Allow shutdown/database flush of pseudo server at task exit
We have a problem where pseudo server processes exist after bitbake exits
and hold the pseudo database in memory. In a docker container, the processes
will be killed as the container is destroyed with no warning and no opportunity
to write the data to disk. This leads to permissions/inode corruptions and
data loss.

Send a shutdown message to pseudo which in new versions of pseudo will flush
the database, thereby fixing some of the issues people using docker containers
see.

(Bitbake rev: a07a971b40acd3eee12e203d2cfa3e49f56109f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-26 14:37:34 +01:00
Alexander Kanavin
2b399a01b5 bitbake: bitbake: enable python warnings at the first opportunity
We really do want to see those, as they tend to turn into
hard errors eventually, as what happened with collections
vs collections.abc in python 3.10.

(Bitbake rev: bc43fbb86361a21dc2d5deb910810c5a77fdabe8)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-19 11:33:14 +01:00
Richard Purdie
4437754142 bitbake: bitbake-worker: Improve error handling
If bitbake-worker fails, return an error code showing that. Also
make the thread cleanup code explict in a finally clause as it would
otherwise hang.

[YOCTO #14393]

(Bitbake rev: 7e0af70fb53fb13f824ca954b8cc1dffee730233)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-16 09:51:14 +01:00
Martin Jansa
b978f7c3a0 bitbake: cooker/process: Fix typos in exiting message
(Bitbake rev: 1ff1ea3880d293b14ce0fc65e3bc4c938d587a2f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-01 18:56:25 +01:00
Paul Barker
295b75cf1c bitbake: prserv: Add read-only mode
[YOCTO #13659]

(Bitbake rev: 44287430b9804fcbf2440f85a2424792140e4dc9)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
[updated for asyncrpc changes]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-23 08:30:55 +01:00
Richard Purdie
d1ff0ac9df bitbake: bitbake: Update to version 1.51.1
(Bitbake rev: ca88466f6d244042b12b66ccd69e27ca2f057d17)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Joshua Watt
8410987884 bitbake: bitbake: Add piping compression library
Adds a library that implements file-like objects (similar to
gzip.GzipFile) that can stream to arbitrary compression programs. This
is utilized to implement a LZ4 and zstd compression API.

(Bitbake rev: 61c3acd058ea018696bd284b3922d0b458838d05)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-20 18:59:18 +01:00
Richard Purdie
49da1ed2dc bitbake: bitbake: Switch to post release version number 1.51.0
(Bitbake rev: 97a64d12f70eb02f1d35b4ffefb291b80ca8c425)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-06 11:08:08 +01:00
Richard Purdie
7bbeddeee1 bitbake: bin/bitbake-getvar: Add a new command to query a variable value (with history)
We've talked about having this for long enough. Add a command which queries a single
variable value with history. This saves "bitbake -e | grep" and avoids the
various pitfalls that has.

It also provides a neat example of using tinfoil to make such a query.

Parameters to limit the output to just the value, to limit to a variable flag
and to not expand the output are provided.

[YOCTO #10748]

(Bitbake rev: 4c1881b620e885f55d7772f8626b8a76c2828333)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-06 11:08:08 +01:00
Richard Purdie
6584e59ff0 bitbake: bitbake-server: Remove now unneeded code
With the previous patch this code is now pointless as we'd have hit a TypeError
before now.

(Bitbake rev: 6301a99055c79d89b715f72182cd0ef1b781b89a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-20 13:57:50 +01:00
Ross Burton
01066a584a bitbake: bitbake-server: ensure server timeout is a float
bitbake-server is spawned by process.py and passes the arguments it is
given to ProcessServer.  There's some type confusion here:

bitbake-server is called with a string representation of the timeout,
which may be None.  If the timeout is not set, pass 0 instead of None.

Inside bitbake-server a ProcessServer is created which expects the
timeout to be a float not a string, so always float() the value.

[ YOCTO #14350 ]

(Bitbake rev: c93ae1f861208f6d39fd15c84fbcd0e2b54331f5)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-20 13:57:50 +01:00
Richard Purdie
ca07d22405 bitbake: bitbake: Update version to 1.50.0 stable release series
(Bitbake rev: e70b925ba98fd4fedf3940d141a4210c953087ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-09 14:20:01 +01:00
Richard Purdie
c8d4f2e401 bitbake: bitbake: Bump version to 1.49.2
This allows metadata to rely upon BB_DEFAULT_UMASK.

(Bitbake rev: 969ac64adab236ce2d5196bcc294005a497913ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-16 11:26:11 +00:00
Richard Purdie
f4fb744657 bitbake: bitbake-worker/runqueue: Add support for BB_DEFAULT_UMASK
Currently each task has to have a umask specified individually. This
is leading to determinism issues since it is easy to miss specifying
this for an extra task.

Add support for specifing the default task umask globally which
simplifies the problem.

(Bitbake rev: 3e664599fd54a8a37ce587022fcbce5ca26f2ed3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-16 11:26:11 +00:00
Richard Purdie
e1691ae855 bitbake: bitbake: Bump release to 1.49.1
(Bitbake rev: 9f23fa605c542a705d00c6c263491899d55bb0d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-10 23:48:16 +00:00
Joshua Watt
75f87db413 bitbake: logging: Make bitbake logger compatible with python logger
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 <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-10 23:48:16 +00:00
Paul Barker
94f34b951b bitbake: hashserv: Add short forms of remaining command line arguments
Short form arguments are added for convenience.

(Bitbake rev: 921199a4923ce383b27e23c9b7e34eb785c8bae3)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-10 23:48:16 +00:00
Paul Barker
44176bd385 bitbake: hashserv: Support upstream command line argument
The hashserv server already implements support for pulling hash data
from another "upstream" server. Add the -u/--upstream argument to the
bitbake-hashserv app to expose this functionality to users.

(Bitbake rev: 8de510f1de35e581bcd5858edf23619c6a4cf923)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-10 23:48:16 +00:00
Paul Barker
3b559bb16d bitbake: hashserv: Support read-only server
The -r/--readonly argument is added to the bitbake-hashserv app. If this
argument is given then clients may only perform read operations against
the server. The read-only mode is implemented by simply not installing
handlers for write operations, this keeps the permission model simple
and reduces the risk of accidentally allowing write operations.

As a sqlite database can be safely opened by multiple processes in
parallel, it's possible to start two hashserv instances against a single
database if you wish to export both a read-only port and a read-write
port.

(Bitbake rev: 492bb02eb0e071c792407ac3113f92492da1a9cc)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-10 23:48:16 +00:00
Richard Purdie
2ffbb020fe bitbake: bitbake-worker: Try and avoid potential short write events issues
We're seeing occasional issues where builds fail as events were written from the
worker children in the form <event>partial data<event>full event</event>.

This causes failures as bitbake server can't parse that and exits. This could
be due to short writes to the worker event pipe which we weren't checking. Check
this and loop accordingly. Also add some asserts to detect other potential causes.

Thanks to Joshua Watt for help in spotting the issue.

[YOCTO #14181]

(Bitbake rev: a9451746a4bd7ccedf4c72cd03ad4ff0ab0143aa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-06 09:12:00 +00:00
Paul Barker
a8a468efac bitbake: bitbake-hashclient: Remove obsolete call to client.connect
The connect function was previously removed from the hashserv Client
class but the bitbake-hashclient app was not updated. The client is
connected during hashserv.create_client() anyway so not separate connect
call is needed.

(Bitbake rev: 99bdb236bceeffa0083a0fa529280b217c1d310d)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-06 09:12:00 +00:00
Richard Purdie
288e3283af bitbake: bitbake: Post release version bump
(Bitbake rev: 20ef79a328be280e8779f31924ec33c1a4ca1758)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-30 13:26:16 +00:00
Richard Purdie
c9b60b8bff bitbake: bitbake: Bump version to 1.48.0 ready for the new release
(Bitbake rev: f421de9effc2ba40145373881d20b8e823cf23f8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-19 23:43:09 +01:00
Richard Purdie
1a9e0997c8 bitbake: Revert "bitbake-layers: add signal hander to avoid exception"
This reverts commit 4fca9a07f2d6b0544977112672b786982d7bb8f2.

The default python handler is to ignore SIGPIPE errors yet by adding
this line, we see:

2020-09-23 22:10:20,325 - oe-selftest - INFO - recipetool.RecipetoolTests.test_recipetool_appendfile_subdir (subunit.RemotedTestCase)
2020-09-23 22:10:20,325 - oe-selftest - INFO -  ... FAIL
2020-09-23 22:10:20,325 - oe-selftest - INFO - 11: 30/44 227/415 (14.85s) (recipetool.RecipetoolTests.test_recipetool_appendfile_subdir)
2020-09-23 22:10:20,325 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/recipetool.py", line 226, in test_recipetool_appendfile_subdir
    _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile'])
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/recipetool.py", line 85, in _try_recipetool_appendfile
    return self._try_recipetool_appendcmd(cmd, testrecipe, expectedfiles, expectedlines)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/recipetool.py", line 49, in _try_recipetool_appendcmd
    bbappendfile = self._check_bbappend(testrecipe, recipefile, self.templayerdir)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/devtool.py", line 186, in _check_bbappend
    result = runCmd('bitbake-layers show-appends', cwd=self.builddir)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/utils/commands.py", line 201, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'bitbake-layers show-appends' returned non-zero exit status 141:
NOTE: Reconnecting to bitbake server...

where status 141 is SIGPIPE.

We expect SIGPIPE not to be raised like this. I tried the commands in the original
commit to pipe through less with the change reverted and I don't see the error
shown. I therefore believe this is safe to revert.

(Bitbake rev: 94a18f1f2e51dd5d3928e6e0c17f2c19c8b5db49)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-24 22:34:16 +01:00
Jean-Francois Dagenais
304d7a0861 bitbake: bitbake: tests/siggen: introduce clean_basepath testcases
While discussing with Richard we thought these might help document
and safeguard the basic requirements of clean_basepath.

A 'bonus' performance testcase is added but commented out since its
runtime is long and test machine specific. It is intended for developers
to test before and after their changes to the target function as a due
diligence verification.

(Bitbake rev: ee41549f26952d5f7af19a9b3d8a8b969866e2ef)

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23 20:55:53 +01:00
Richard Purdie
7002d67de0 bitbake: server/process: Add bitbake-server and exec() a new server process
Trying to have a new python process forked off an original doesn't work
out well and ends up having race issues. To avoid this, exec() a new
bitbake server process. This starts with a fresh python interpreter
and resolves various atexit and other multiprocessing issues once
and for all.

(Bitbake rev: 9501dd6fdd7a7c25cbfa4464cf881fcf8c049ce2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25 18:14:53 +01:00
Richard Purdie
4c94d36022 bitbake: build/msg: Cleanup verbose option handling
The levels of indirection to set these verbose logging options is rather
crazy. This attempts to turn things into two specific options with
much more specific meanings. For now its all still controlled by the
commandline verbose option and should funciton as previously, with
the addition that the BB_VERBOSE_LOGS option can now be task specific.

(Bitbake rev: 423c046f2173aaff3072dc3d0882d01b8a0b0212)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25 18:14:53 +01:00
Chris Laplante
1752a47664 bitbake: tests/color: add test suite for ANSI color code filtering
Includes tests for bb.progress integration.

(Bitbake rev: c472a8da521cc7f1d61ac2f28596167d47ab8a5a)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08 09:19:34 +01:00
Richard Purdie
f99b77eb81 bitbake: bin/bitbake: Update to next series release version
(Bitbake rev: e6e5cdf306e62c201a8af0cbe2b498781a54c52b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-16 23:34:45 +01:00