]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
devtool: __init__: small cleanups
authorChris Laplante <chris.laplante@agilent.com>
Tue, 16 Sep 2025 15:51:43 +0000 (11:51 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Sep 2025 10:08:20 +0000 (11:08 +0100)
+ Remove unused exec_fakeroot method, which wouldn't
  work anyway since it doesn't pass kwargs correctly.

+ Fix a None comparison

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>
scripts/lib/devtool/__init__.py

index 396e8025b7f259da601c7788a5ab148cb6df6a10..717a60c039ff8e09fab90b9112e526956456bb83 100644 (file)
@@ -66,7 +66,7 @@ def exec_watch(cmd, **options):
             sys.stdout.write(out)
             sys.stdout.flush()
             buf += out
-        elif out == '' and process.poll() != None:
+        elif out == '' and process.poll() is not None:
             break
 
     if process.returncode != 0:
@@ -74,13 +74,6 @@ def exec_watch(cmd, **options):
 
     return buf, None
 
-def exec_fakeroot(d, cmd, **kwargs):
-    """Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions"""
-    # Grab the command and check it actually exists
-    fakerootcmd = d.getVar('FAKEROOTCMD')
-    fakerootenv = d.getVar('FAKEROOTENV')
-    exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, kwargs)
-
 def exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, **kwargs):
     if not os.path.exists(fakerootcmd):
         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')