From: Walter Werner Schneider <[email protected]> Without this "script" command, the "devtool build" provides a very ambigous error: `/bin/sh: line 1: script: command not found`. With this patch we provide a more detailed error.
On Fedora 43 the "script" command is not present by default, one needs to install the "util-linux-script" package. On other systems it's in a different package. Signed-off-by: Walter Werner Schneider <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> (cherry picked from commit e9103c0ed24b0f3a50b878c626879748d8260ad0) Signed-off-by: Yoann Congal <[email protected]> --- scripts/lib/devtool/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index f47f57c465d..58b02eb4604 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py @@ -42,6 +42,9 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options): init_prefix = '' if watch: if sys.stdout.isatty(): + import shutil + if not shutil.which('script'): + raise DevtoolError('The util-linux "script" command was not found') # Fool bitbake into thinking it's outputting to a terminal (because it is, indirectly) cmd = 'script -e -q -c "%s" /dev/null' % cmd return exec_watch('%s%s' % (init_prefix, cmd), **options)
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#240197): https://lists.openembedded.org/g/openembedded-core/message/240197 Mute This Topic: https://lists.openembedded.org/mt/120131948/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
