]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Actually apply --source-file-transfer=mount when booting with nspawn
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 21 Jul 2022 10:51:08 +0000 (12:51 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 21 Jul 2022 13:07:57 +0000 (15:07 +0200)
mkosi/__init__.py

index e28e56f2ccbe5b5f12923f1b5c1d737774186ee4..4adaaf46419e5a90ba80fa25b994767cb75dabeb 100644 (file)
@@ -7862,6 +7862,9 @@ def run_shell_cmdline(args: MkosiArgs, pipe: bool = False, commands: Optional[Se
     if args.nspawn_keep_unit:
         cmdline += ["--keep-unit"]
 
+    if args.source_file_transfer_final == SourceFileTransfer.mount:
+        cmdline += [f"--bind={args.build_sources}:/root/src", "--chdir=/root/src"]
+
     if commands or args.cmdline:
         # If the verb is 'shell', args.cmdline contains the command to run.
         # Otherwise, the verb is 'boot', and we assume args.cmdline contains nspawn arguments.