]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: deploy: Reset PATH after strip_execs
authorPaul Barker <paul@pbarker.dev>
Tue, 6 Jan 2026 16:03:33 +0000 (16:03 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Jan 2026 16:50:56 +0000 (16:50 +0000)
We need to modify os.environ so that strip_execs() finds the correct
binaries to run. We shouldn't leave this modification in place for the
rest of the program execution though.

Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/deploy.py

index 2bf693d165a0c93efca3ab5f21157f9c2def3f20..270e9104b25b784b0eb42dad7f722e1f91efaf35 100644 (file)
@@ -188,8 +188,11 @@ def deploy_no_d(srcdir, workdir, path, strip_cmd, libdir, base_libdir, max_proce
         if os.path.isdir(recipe_outdir):
             exec_fakeroot_no_d(fakerootcmd, fakerootenv, path, "rm -rf %s" % recipe_outdir, shell=True)
         exec_fakeroot_no_d(fakerootcmd, fakerootenv, path, "cp -af %s %s" % (os.path.join(srcdir, '.'), recipe_outdir), shell=True)
+
+        oldpath = os.environ['PATH']
         os.environ['PATH'] = ':'.join([os.environ['PATH'], path or ''])
         oe.package.strip_execs(args.recipename, recipe_outdir, strip_cmd, libdir, base_libdir, max_process)
+        os.environ['PATH'] = oldpath
 
     filelist = []
     inodes = set({})