diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-07 13:54:04 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-08 16:45:06 +0100 |
| commit | a9fbdd9b243d89c1ff98b75c68fe4342c0f43ace (patch) | |
| tree | d05fefa8c5009f3922eea8cc547a074d906ef751 /bitbake | |
| parent | 0f939ecaf87307ef4fe24f57f0b559f4049558f9 (diff) | |
| download | poky-a9fbdd9b243d89c1ff98b75c68fe4342c0f43ace.tar.gz | |
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>
Diffstat (limited to 'bitbake')
| -rwxr-xr-x | bitbake/bin/bitbake-worker | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 115bc1d091..6a12e1fed2 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
| @@ -287,10 +287,12 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha | |||
| 287 | try: | 287 | try: |
| 288 | if dry_run: | 288 | if dry_run: |
| 289 | return 0 | 289 | return 0 |
| 290 | ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile) | 290 | try: |
| 291 | if fakeroot: | 291 | ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile) |
| 292 | fakerootcmd = shlex.split(the_data.getVar("FAKEROOTCMD")) | 292 | finally: |
| 293 | subprocess.run(fakerootcmd + ['-S'], check=True, stdout=subprocess.PIPE) | 293 | if fakeroot: |
| 294 | fakerootcmd = shlex.split(the_data.getVar("FAKEROOTCMD")) | ||
| 295 | subprocess.run(fakerootcmd + ['-S'], check=True, stdout=subprocess.PIPE) | ||
| 294 | return ret | 296 | return ret |
| 295 | except: | 297 | except: |
| 296 | os._exit(1) | 298 | os._exit(1) |
