]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fixed regression when using UsrOnly during initial install
authorMichael A Cassaniti <michael@cassaniti.id.au>
Thu, 21 Jul 2022 01:39:44 +0000 (11:39 +1000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 21 Jul 2022 09:49:04 +0000 (11:49 +0200)
Several distributions call `run_workspace_command()` during installation and
this now requires the root directory that gets bind mounted in to exist. The
created directory will be removed anyway since it exists under a temporary
workspace.

As an example, the documentation removal when installing a Debian derivative
will fail without this change.

mkosi/__init__.py

index 3a9625de40b8b20b1e91ae5293a7cb67adb92cd1..9881099bf448eae1ae9257b9a1d66a21d05a9be8 100644 (file)
@@ -1841,7 +1841,7 @@ def prepare_tree(args: MkosiArgs, root: Path, do_run_build_script: bool, cached:
             root.joinpath("etc/kernel/entry-token").write_text(f"{args.machine_id}\n")
             root.joinpath("etc/kernel/install.conf").write_text("layout=bls\n")
 
-        if do_run_build_script or args.ssh:
+        if do_run_build_script or args.ssh or args.usr_only:
             root_home(args, root).mkdir(mode=0o750)
 
         if args.ssh and not do_run_build_script: