Commit Graph

5631 Commits

Author SHA1 Message Date
Reyna, David
5504b3a921 bitbake: toaster: Update documentation links to new URLs
Update the Toaster documentation links to the new
Yocto Project URLs.

[YOCTO #14092]

(Bitbake rev: 9345d257ced432adc2d16af20ace58cc7c086aab)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-19 23:43:30 +01: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
7cad26d585 bitbake: ui/toasterui: Fix startup faults from incorrect event sequencing
Toaster has been failing to start correctly when in interactive mode. The
issue is due to setEventMask being called (which triggers parsing) before
the environment has been sent from the UI over to the server. This means
PATH isn't setup, which causes the sanity checks on HOSTTOOLS to fail
in base.bbclass.

The fix is to ensure the environment is sent to the server before
other commands are run.

The pain in debugging this highlights other improvements to the logging
are needed.

[YOCTO #14079]

Reviewed-by: Tim Orling <timothy.t.orling@linux.intel.com>
Tested-by: Tim Orling <timothy.t.orling@linux.intel.com>
(Bitbake rev: a8efff5c83cd5a25f4b6720e6414a7aa35d04bc7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-17 12:36:14 +01:00
David Reyna
1613cd01d0 bitbake: toaster: Enable Gatesgarth branch in place of Zeus
Toaster directly supports the last two stable branches
of Yocto Project. With "Gatesgarth " being released, it
is time to replace "Zeus".

[YOCTO #14086]

(Bitbake rev: de578cd8f8b582c7bea83c75d06b7f667c07578a)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-17 12:36:14 +01:00
Tim Orling
98e5d24fa9 bitbake: lib/bb/ui/knotty: fix typo in parseprogress
After parseprogress.finish() it was intended to
set parseprogress to None, but a typo means this
is not happening.

(Bitbake rev: f504d6f6598f62aa20fbf69c30fea95569858edb)

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-17 12:36:14 +01:00
Charlie Davies
b50b6007e5 bitbake: bitbake: fetch/git: use shlex.quote() to support spaces in SRC_URI url
This commit replaces the instances where escaped double quotes
are used to support SRC_URI url containing spaces with the more
pythonic shlex.quote().

(Bitbake rev: 4f9ba9c794de55bea0343267467bddea99844374)

Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-17 12:36:14 +01:00
Richard Purdie
0c0b236b4c bitbake: process: Show command exceptions in the server log as well
There are autobuilder logs where the server commands are failing
but we have no debug info in the server log. Improve this to try and
understand what is failing.

(Bitbake rev: 04d3a79226c9ea448b22f4efbab33876a72c9bdb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-11 13:44:26 +01:00
Richard Purdie
ebaa3e3f51 bitbake: tinfoil: When sending commands we need to process events
The server may be displaying useful information for the user through log
messages so we should display anything that has been sent. Its either this
or expecting every UI to implement this code around every command call
which isn't good API.

[YOCTO #14054]

(Bitbake rev: 64ae9d7e2fad804dd9e12706c6d76b4b22f9586b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10 13:37:56 +01:00
Richard Purdie
20397f8d4b bitbake: command: Ensure exceptions inheriting from BBHandledException are visible
Previous changes allowed BBHandledException to be detected but not exceptions
which inherit from it. Fix this. The code really needs totally reworking
to preserve the exceptions.

[YOCTO #14054]

(Bitbake rev: ef762d92df6c2554c6248e80212f984d9ec4c651)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-10 13:37:56 +01:00
Richard Purdie
2607799cfb bitbake: cooker: Avoid tracebacks if data was never setup
Recent changes mean data might not be setup. If its not, avoid tracebacks.

(Bitbake rev: 3daff610d9f39d73c80c54d1df46f573666e20db)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-01 21:16:57 +01:00
Ross Burton
afb863afc3 bitbake: siggen: use correct umask when writing siginfo
We try to write sstate with group-write permissions so that sstate-cache
can be shared between multiple users.  However the siginfo files are
created in various tasks which may set their own umask (such as
do_populate_sysroot, 0022).  This results in no group write permission
on the intermediate directories, which is fatal when sharing a cache.

Fix this by wrapping the siginfo mkdir in a umask change to 0002.

(Bitbake rev: 75d9ef04a908e366633b255d23ab3275f6860d3a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30 15:03:30 +01:00
Ross Burton
f3b0d3eeae bitbake: utils: add umask changing context manager
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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30 15:03:30 +01:00
Leif Middelschulte
cd1795287a bitbake: tests/fetch: backslash support in file:// URIs
Implements backslashes in local filenames.
A typical usecase for such a filename is a systemd unit.

Example: `dev-disk-by\x2dlabel-FOO.device`

(Bitbake rev: 14a35f273b579d5cd5fd92765b89c28f870dd577)

Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-25 08:32:02 +01:00
Leif Middelschulte
b1dff146a6 bitbake: fetch2: fix handling of \ in file:// SRC_URI
Using backslashes in file:// URIs was broken.
Either the resolver would fail or the subsequent `cp` command.
Try to avoid this by putting the filenames into quotes.

Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=8161

(Bitbake rev: aa857fa2e9cf3b0e43a9049b04ec4b0b3c779b11)

Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-25 08:32:02 +01:00
Ross Burton
befe6d2cec bitbake: taskexp: update for GTK API changes
The introspected API for GtkTreeModel and friends had some unexpected
quirks which have now been fixed, see[1] for details. However, for
example Ubuntu 20.04 has the fixed GTK but not an updated pygobject which
means taskexp raises an exception on startup.

Solve by manually looking at what functions are present and calling the
right one.

[ YOCTO #14055 ]

[1] 9cdbc56fba

(Bitbake rev: ac7d1114a7e99e6efd6a37b03d170faf678513fb)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-24 22:34:16 +01:00
Jean-Francois Dagenais
2058641164 bitbake: bitbake: siggen: clean_basepath: improve perfo and readability
This change improves performance by reducing runtime about 33% for typical
inputs. (using test_clean_basepath_performance)

It is also easier to read, and slightly more resilient to future changes since it doesn't
mention 'virtual' anymore.

(Bitbake rev: 27b53186fa67d281d29b2f8e15bcff8dc2557b8a)

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Co-Developed-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23 20:55:53 +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
Charlie Davies
005f2951e2 bitbake: bitbake: tests/fetch: add unit tests for SRC_URI with spaces in url
(Bitbake rev: e7dab75c8d1923abcbbc7c9ac7de215d720ccf26)

Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23 20:55:53 +01:00
Charlie Davies
9ef2bc360d bitbake: bitbake: fetch/git: add support for SRC_URI containing spaces in url
Microsoft's TFS VCS system allows for spaces in a git repository url.
An example of a valid url is:

ssh://tfs-my-company.org:22/tfs/My Projects/FooBar

This commit adds support for such urls by implementing two changes.
Firstly, when bitbake makes a git command line call the url is
surrounded by quotes so that the url, regardless of spaces, is
treated as one argument. Secondly, additional parsing of various
filepath variables, which are based off of the url, are now
completed with any spaces in the url replaced with underscores.

(Bitbake rev: eb38b6f0935763f7ba19e5618f376fcae1dac41a)

Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23 20:55:53 +01:00
Anatol Belski
79ce7f1c82 bitbake: bitbake: hashserv: Fix localhost sometimes resolved to a wrong IP
Using localhost for direct builds on host is fine. A case with a
misbehavior has been sighted on a Docker build. Even when the host
supports IPv6, but Docker is not configured correspondingly - some
versions of the asyncio Python module seem to misbehave and try to
use IPv6 where it's not supported in the container. This happens at
least on some Ubuntu 18.04 based containers, resolving the IP
explicitly appears to be the fix.

(Bitbake rev: 0e20f91c11afdc17ea776aa02e0cc8b0d59a23d4)

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23 20:55:53 +01:00
Joshua Watt
42bbf1451a bitbake: cooker: Block SIGINT in worker processes
Blocks SIGINT in the worker processes to prevent them from running the
parent process signal handler, which causes them to deadlock under
certain circumstances.

[YOCTO #14034]

(Bitbake rev: 9f4207f4b598f549cbd4159841c720276736f23b)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-15 11:53:49 +01:00
Richard Purdie
fd924e293f bitbake: tests/fetch: Move away from problematic freedesktop.org urls
We're either hitting rate limiting with freedesktop.org or the
servers have intermittent network connections. Use our own mirror
of these repositories instead.

(Bitbake rev: a1b7ab5c9d5e64969f5ca0e41c0ac13c723e3761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-15 11:53:49 +01:00
Richard Purdie
c4daf38f47 bitbake: tinfoil: Ensure sockets don't leak even when exceptions occur
We're seeing leaking open socket connections when errors occur and
tinfoil is in use. Improve the exception handling so the sockets
are closed even if exceptions occur, allowing more robust behaviour
when things go wrong.

(Bitbake rev: cefbec9ff47ca973a74ec7300cd736f3e0f0bce0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-12 16:02:11 +01:00
Richard Purdie
79adf16931 bitbake: cooker/command: Fix disconnection handling
After the recent init changes, if a client disconnects before issuing a
command, the cooker can break in the reset handlers. Add some guards
in the code to prevent this.

(Bitbake rev: 12605e30e4c4e1ae6a67c97363b892ebf0b9566c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-12 15:29:56 +01:00
Chris Laplante
9b2b23d5ec bitbake: utils: fix UnboundLocalError when _print_exception raises
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 <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-10 13:49:21 +01:00
Robert Yang
f738ed43e9 bitbake: utils.py: get_file_layer(): Improve performance
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 -> 40s).

(Bitbake rev: f08a6601c9bb09622855d62e1cedb92fafd2f71d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-10 13:49:21 +01:00
Robert Yang
f543535e3c bitbake: utils.py: get_file_layer(): Exit the loop when file is matched
This can make "$ bitbake-layers show-recipes" save about 60% time (14min ->
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 <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-10 13:49:21 +01:00
Robert Yang
a74fb2b306 bitbake: cooker.py: Save prioritized BBFILES to BBFILES_PRIORITIZED
The original code saved BBFILES back to BBFILES without any changes which isn't
usefule, so remove that line. Now save prioritized BBFILES to
BBFILES_PRIORITIZED which can accelerate the query a lot for the one which
relies on it such as bb.utils.get_file_layer().

(Bitbake rev: 49bdb5dfa57b41b3ed399961e947c404f9195998)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-10 13:49:21 +01:00
Chris Laplante
926c154eb4 bitbake: utils: process_profilelog: use context manager
(Bitbake rev: 42172900af06baeee559d33b150d5febdf8e960a)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-10 13:49:21 +01:00
Richard Purdie
c25309ecde bitbake: cooker: Ensure parser worker signal handlers are default
Otherwise this can interfer with multiprocessing exit handling.

(Bitbake rev: b88816c4c84fa4f5ad39c263f5e75b96476e9768)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-08 10:18:02 +01:00
Richard Purdie
1ba387a12c bitbake: cooker: Avoid parser deadlocks
If you make parsing fail (e.g. add something like:

X := "${@d.getVar('MCMACHINES').split()[1]}"

to meson.bbclass, then run "while true; do bitbake -g bash; done"
it will eventually hang. It appears the cancel_join_thread() call the
parsing failure triggers, breaks the results_queue badly enough that it
sits in read() indefintely (called from self.result_queue.get(timeout=0.25)).
The timeout only applies to lock aquisition, not the read call.

I've tried various other approaches such as using cancel_join_thread()
in other places but the only way things don't lock up is to avoid
cancel_join_thread() entirely for results_queue.

I do have a concern that this may adversely affect Ctrl+C handling
but equally, its broken now already and this appears to improve
things.

[YOCTO #14034]

(Bitbake rev: 9c61a1cc7be46c23da1f4ef3bee070fb83c4be57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-08 10:18:02 +01:00
Richard Purdie
0486b342fe bitbake: cooker: Ensure parser is cleaned up
During cooker shutdown, its possible the parser isn't cleaned up. Fix
this (which may partially explain why threads were left hanging around
at exit).

(Bitbake rev: 928609f30f3a20aaa2f88afc18044a4e10199488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-06 09:58:50 +01:00
Richard Purdie
ef21d08424 bitbake: server/process: Note when commands complete in logs
Its hard to tell from the server logs whether commands complete or not
(or how long they take). Add extra info to allow more debugging of
server timeouts.

(Bitbake rev: 56285ada585ec1481449522282b335bcb5a2671e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:18 +01:00
Richard Purdie
707f99642a bitbake: server/process: Prefix the log data with pid/time information
Knowing which process printed which messages and the timestamp of the
message is useful for debugging, so add this. Ensure the log parsing
isn't affected by using search() instead of match().

(Bitbake rev: 1d043666710df1fa9d9586fd974c0371dd1514b0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:18 +01:00
Richard Purdie
f71587695c bitbake: server/process: Ensure we don't keep looping if some other server is started
Showing "leftover process" messages when a new server has started and is being
used by some UI is horrible. Compare the PID data from the lockfile to
avoid this (and the ton of confusing log data it generates).

Also, move the time.sleep() call to be after the first lock attempt, which
reduces noise in the logs significantly.

(Bitbake rev: ce1897a31afb5a14997bc3d2f459b90d43eecb7d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:18 +01:00
Richard Purdie
38c05fb822 bitbake: cooker: Assign a name to the sync thread to aid debugging
(Bitbake rev: ffdb3d3fa690c35e9a96fc451a5811f5131276f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:18 +01:00
Richard Purdie
aaa286e48a bitbake: cooker: Ensure parser replacement calls parser final_cleanup
This could potentialy account for some of the missing thread cleanup
we're seeing.

(Bitbake rev: 8f2d690428de8934868b406b79c4699a8ebe902c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:18 +01:00
Richard Purdie
175e5f2702 bitbake: server/process: Don't show tracebacks if the lockfile is removed
lsof/fuser error if the file doesn't exist. It can be deleted by something
else so ignore this if it happens and loop.

(Bitbake rev: b100d22ce37b7548b50e59a71802bcc903acd6ea)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:16 +01:00
Richard Purdie
f6a40d457c bitbake: server/process: Ensure logging is flushed
The cookerlog output goes to a file and its misleading to look at it and
not have it up to date with what the cooker is actually doing. Ensure
written data is flushed.

Ultimately this should be using python's logging but that is for another
day, we need simple fixes right now.

(Bitbake rev: d95c3dd2b8ac50423976a7baf0a51e9580871761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:16 +01:00
Richard Purdie
341c5ca419 bitbake: process: Avoid printing binary strings for leftover processes
The binary string printed into the output is ugly, parse this so the
linebreaks come out in the logs and make them much more readable (I
was misssing the information initially despite looking for it).

(Bitbake rev: c2dd8bb434d5738fedf9019651074b90affff3b2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:16 +01:00
Richard Purdie
e2afb73ccb bitbake: cookerdata: Fix exception raise statements
Lets use valid python even if it the original happens to work.

(Bitbake rev: 343187c57e1459b0e57f90463843782f3a3a8443)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:16 +01:00
Richard Purdie
16f820a2a8 bitbake: cooker/cookerdata: Use BBHandledException, not sys.exit()
Calling sys.exit() in the middle of the code is rather antisocial. We catch
this in various places but we shouldn't have to. In all these cases we have
already sent events explaining to the user what happened. This means the
correct exception is BBHandledException.

The recent startup changes have moved the point a lot of this code gets
called to inside the UI, with memres it would have always been possible
from there anyway. This change makes things much more consistent.

(Bitbake rev: 91699f366d24480ff3b19faec78fb9f3181b3e14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:16 +01:00
Mark Hatle
4cb33dae15 bitbake: process.py: Handle SystemExit exception to eliminate backtrace
With an invalid layer, the desired error output should be:

  ERROR: The following layer directories do not exist:
  ERROR:    /this_path_does_not_exist
  ERROR: Please check BBLAYERS in .../build-invalid-layer/conf/bblayers.conf

Instead we were met with a backtrace:

Traceback (most recent call last):
  File "/scratch1/fray/xilinx/poky/bitbake/bin/bitbake", line 36, in <module>
    cookerdata.CookerConfiguration()))
...
  File "/scratch1/fray/xilinx/poky/bitbake/lib/bb/cookerdata.py", line 267, in parseBaseConfiguration
    self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
  File "/scratch1/fray/xilinx/poky/bitbake/lib/bb/cookerdata.py", line 358, in parseConfigurationFiles
    sys.exit(1)
SystemExit: 1

(Bitbake rev: 3a2503c785a5cd9dca0dc68c3aec31b4bec7684b)

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-05 11:45:16 +01:00
Richard Purdie
a6709152e9 bitbake: process/knotty: Improve early exception handling
The new server startup code means exceptions can happen when we aren't
setup to show them to the user correctly, leading to ugly tracebacks.

Add in some special case handling of BBHandledException to at least
ensure that common case doesn't traceback and the user sees meaningful
output.

In the future, the logging setup can likely be improved, as can the way
runCommand handles exceptions, they all should likely become real
exceptions again on the UI side.

[YOCTO #14022]
[YOCTO #14033]

(Bitbake rev: 6059d0e77f60ddb679049bd34478f41b1ab7995d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02 16:01:05 +01:00
Chris Laplante
d38276f55c bitbake: COW: migrate test suite into tests/cow
Convert the test suite that was in COW.py into something that
will actually run as part of bitbake-selftest. This is in
preparation for some cleanups I plan in COW.py.

(Bitbake rev: a73d45cb6010e14bf93fec857303bc7ff321066f)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02 16:01:05 +01:00
Chris Laplante
ef26587a72 bitbake: COW: formatting
(Bitbake rev: d2b202e04cd4837992283577747475fa7d9e34e5)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02 16:01:05 +01:00
Richard Purdie
2b3bd34f9b bitbake: server/process: Fix typo in code causing tracebacks
(Bitbake rev: 14caa3d4e5615252b9453162183980044d896d2f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26 11:28:54 +01:00
Richard Purdie
4965496c4a bitbake: utils: Drop broken timeout function
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 <richard.purdie@linuxfoundation.org>
2020-08-26 09:05:38 +01:00
Richard Purdie
8ecde1aa8f bitbake: process: Avoid bb.utils.timeout
I have a suspicion based on process traces that the flock() call is no
longer interrupted by SIGALRM and hence the timeout doesn't work. We
were relying on EINTR triggering around syscalls but python is likely
protecting us from that in modern versions.

Re-implement this code with a different mechanism which doesn't have
that potential issue.

(Bitbake rev: 8eb52afdfd4c3e6478d4f8cc56e99def3f1c924c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26 09:05:38 +01:00
Chris Laplante
77441a08d4 bitbake: compat.py: remove file since it no longer actually implements anything
Now that compat.py just imports Python standard library stuff, get rid
of the layer of indirection.

(Bitbake rev: e2be6defbb9fcf25f9df04c3b452d0dba48dfd03)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-26 09:05:38 +01:00