diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2025-09-16 11:51:43 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-18 11:16:42 +0100 |
commit | bde1f02b3fd95e4a850b43f5da4057d94a6f5384 (patch) | |
tree | 3d5df33ea00539a34e81835fd336be6f788ef17e /scripts/lib/devtool/__init__.py | |
parent | e96eb61680f0ee3b9a47029327ef25fc03421a3e (diff) | |
download | poky-bde1f02b3fd95e4a850b43f5da4057d94a6f5384.tar.gz |
devtool: __init__: small cleanups
+ Remove unused exec_fakeroot method, which wouldn't
work anyway since it doesn't pass kwargs correctly.
+ Fix a None comparison
(From OE-Core rev: bff3a3d9f8fa695fa05d91419d995de4c8009d9b)
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 396e8025b7..717a60c039 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
@@ -66,7 +66,7 @@ def exec_watch(cmd, **options): | |||
66 | sys.stdout.write(out) | 66 | sys.stdout.write(out) |
67 | sys.stdout.flush() | 67 | sys.stdout.flush() |
68 | buf += out | 68 | buf += out |
69 | elif out == '' and process.poll() != None: | 69 | elif out == '' and process.poll() is not None: |
70 | break | 70 | break |
71 | 71 | ||
72 | if process.returncode != 0: | 72 | if process.returncode != 0: |
@@ -74,13 +74,6 @@ def exec_watch(cmd, **options): | |||
74 | 74 | ||
75 | return buf, None | 75 | return buf, None |
76 | 76 | ||
77 | def exec_fakeroot(d, cmd, **kwargs): | ||
78 | """Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions""" | ||
79 | # Grab the command and check it actually exists | ||
80 | fakerootcmd = d.getVar('FAKEROOTCMD') | ||
81 | fakerootenv = d.getVar('FAKEROOTENV') | ||
82 | exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, kwargs) | ||
83 | |||
84 | def exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, **kwargs): | 77 | def exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, **kwargs): |
85 | if not os.path.exists(fakerootcmd): | 78 | if not os.path.exists(fakerootcmd): |
86 | logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built') | 79 | logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built') |