]> code.ossystems Code Review - openembedded-core.git/commit
wic: use shutil.which
authorMingli Yu <mingli.yu@windriver.com>
Wed, 17 Nov 2021 02:16:23 +0000 (10:16 +0800)
committerAnuj Mittal <anuj.mittal@intel.com>
Mon, 29 Nov 2021 04:48:11 +0000 (12:48 +0800)
commit17e2839001076f7fc56a7cf62196b087351083f1
treea727c8430644c73d957f004c236fecae489a388a
parente3ba0041ccb9633ec21241cb6852aa50c2663677
wic: use shutil.which

Use shutil.which to find the executable instead to silence the below warning:
 $ cat tmp/work/intel_x86_64-poky-linux/core-image-base/1.0-r5/temp/log.do_image_wic
 [snip]
 DEBUG: Executing shell function do_image_wic
 /path/layers/oe-core/scripts/wic:27: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import spawn
 INFO: Creating image(s)...
 [snip]

[RP: Added conversion for missed function reference]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3966cbf5c8a2dbc3a4f0f3eefdbeeb83f522bf87)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
scripts/lib/wic/engine.py
scripts/lib/wic/misc.py
scripts/wic