]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Add extra search paths to $PATH when booting
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 9 Oct 2023 12:41:51 +0000 (14:41 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 9 Oct 2023 12:41:51 +0000 (14:41 +0200)
mkosi/__init__.py

index eec08000a4e72be08f93641092ff97096820e8e1..4474f8ed51c82309c373040d0df81c846f4502f5 100644 (file)
@@ -2545,7 +2545,9 @@ def run_verb(args: MkosiArgs, presets: Sequence[MkosiConfig]) -> None:
     # We want to drop privileges after mounting the last tools tree, but to unmount it we still need
     # privileges. To avoid a permission error, let's not unmount the final tools tree, since we'll exit
     # right after (and we're in a mount namespace so the /usr mount disappears when we exit)
-    with mount_usr(last.tools_tree, umount=False), mount_passwd(name, uid, gid, umount=False):
+    with mount_usr(last.tools_tree, umount=False),\
+        mount_passwd(name, uid, gid, umount=False),\
+        prepend_to_environ_path(last):
 
         check_tools(args, last)