cmdline += ["--image", fname]
for tree in config.runtime_trees:
- target = Path("/root/src") / (tree.target or tree.source.name)
+ target = Path("/root/src") / (tree.target or "")
# We add norbind because very often RuntimeTrees= will be used to mount the source directory into the
# container and the output directory from which we're running will very likely be a subdirectory of the
# source directory which would mean we'd be mounting the container root directory as a subdirectory in
"-chardev", f"socket,id={sock.name},path={sock}",
"-device", f"vhost-user-fs-pci,queue-size=1024,chardev={sock.name},tag={tag}",
]
- target = Path("/root/src") / (tree.target or tree.source.name)
+ target = Path("/root/src") / (tree.target or "")
kcl += [f"systemd.mount-extra={tag}:{target}:virtiofs"]
if want_scratch(config) or config.output_format in (OutputFormat.disk, OutputFormat.esp):
directory to mount into any machine (container or VM) started by
mkosi. The second path refers to the target directory inside the
machine. If the second path is not provided, the directory is mounted
- below `/root/src` in the machine. If the second path is relative, it
+ at `/root/src` in the machine. If the second path is relative, it
is interpreted relative to `/root/src` in the machine.
: For each mounted directory, the uid and gid of the user running mkosi
apply_runtime_size(config, fname)
for tree in config.runtime_trees:
- target = Path("/root/src") / (tree.target or tree.source.name)
+ target = Path("/root/src") / (tree.target or "")
cmdline += ["--bind", f"{tree.source}:{target}"]
if kernel: