diff options
| author | Patrick Ohly <patrick.ohly@intel.com> | 2017-01-31 13:50:29 +0100 | 
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-31 15:28:35 +0000 | 
| commit | aa439f11c7f414774843720d68ebe0a6d3375ea6 (patch) | |
| tree | 899bfae3878bea88e7c1a517046adb0543a98c60 /scripts/contrib/ddimage | |
| parent | 62f42ce063115f4a02c219e323252223818a150f (diff) | |
| download | openembedded-core-aa439f11c7f414774843720d68ebe0a6d3375ea6.tar.gz openembedded-core-aa439f11c7f414774843720d68ebe0a6d3375ea6.tar.bz2 openembedded-core-aa439f11c7f414774843720d68ebe0a6d3375ea6.zip | |
verify-bashisms: fix problems with tinfoil2
tinfoil2 is based on a client/server architecture, which broke the
verify-bashisms script:
- The tinfoil instance and its data proxies can't be pickled, so
  all interaction with the bitbake server has to run in the main
  script process and only processing of the plain scripts can
  be done with multiprocessing:
  _pickle.PicklingError: Can't pickle <class 'bb.tinfoil.TinfoilCookerAdapter.TinfoilRecipeCacheAdapter'>: attribute lookup TinfoilRecipeCacheAdapter on bb.tinfoil failed
- The multiprocessing pool has to be created before initializing
  tinfoil, otherwise the pool workers end up trying to communicate
  with the bitbake server during shutdown:
  ERROR: UI received SIGTERM
  Process ForkPoolWorker-2:
  Traceback (most recent call last):
    File "/usr/lib/python3.4/multiprocessing/process.py", line 257, in _bootstrap
      util._exit_function()
    File "/usr/lib/python3.4/multiprocessing/util.py", line 286, in _exit_function
      _run_finalizers(0)
    ...
    File "/usr/lib/python3.4/multiprocessing/process.py", line 131, in is_alive
      assert self._parent_pid == os.getpid(), 'can only test a child process'
   AssertionError: can only test a child process
- func() needs to defined before creating the pool to avoid:
  AttributeError: Can't get attribute 'func' on <module '__main__' from '/work/openembedded-core/scripts/verify-bashisms'>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/ddimage')
0 files changed, 0 insertions, 0 deletions
