diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-25 22:15:53 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-25 20:54:25 +0100 |
commit | 2194108aacd796565b9e1f8e83d4ae020eba7118 (patch) | |
tree | 9ae4c3427e0e52b6ed3bfed844ab0bce990aa75b /bitbake | |
parent | deea0712942aaa538a4ab8decf63ab4127f6077f (diff) | |
download | poky-2194108aacd796565b9e1f8e83d4ae020eba7118.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: 10d61b276d4ffc65640a862c7e5b5852a5716813)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a2a04c6fe94bc56efcff299c669a151746e35916)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
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 b3877b15c0..4318ce6116 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -286,10 +286,12 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha | |||
286 | try: | 286 | try: |
287 | if dry_run: | 287 | if dry_run: |
288 | return 0 | 288 | return 0 |
289 | ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile) | 289 | try: |
290 | if fakeroot: | 290 | ret = bb.build.exec_task(fn, taskname, the_data, cfg.profile) |
291 | fakerootcmd = shlex.split(the_data.getVar("FAKEROOTCMD")) | 291 | finally: |
292 | subprocess.run(fakerootcmd + ['-S'], check=True, stdout=subprocess.PIPE) | 292 | if fakeroot: |
293 | fakerootcmd = shlex.split(the_data.getVar("FAKEROOTCMD")) | ||
294 | subprocess.run(fakerootcmd + ['-S'], check=True, stdout=subprocess.PIPE) | ||
293 | return ret | 295 | return ret |
294 | except: | 296 | except: |
295 | os._exit(1) | 297 | os._exit(1) |