"--chdir", "/work/src",
*(["--ro-bind-try", "/etc/resolv.conf", "/etc/resolv.conf"] if network else []),
*(["--suppress-chown"] if suppress_chown else []),
- "--",
],
"mkosi-as-caller": mkosi_as_caller(),
**context.config.distribution.package_manager(context.config).scripts(context),
with sandbox as sbx:
prefix = [os.fspath(x) for x in sbx]
+ if prefix:
+ prefix += ["--"]
+
try:
with subprocess.Popen(
[*prefix, *cmdline],
if not overlay and not relaxed:
tmp = stack.enter_context(vartmpdir())
- yield [*cmdline, "--bind", tmp, "/var/tmp", "--dir", "/tmp", "--dir", "/run", *options, "--"]
+ yield [*cmdline, "--bind", tmp, "/var/tmp", "--dir", "/tmp", "--dir", "/run", *options]
return
for d in ("etc", "opt"):
tmp = stack.enter_context(vartmpdir())
cmdline += ["--bind", tmp, "/var/tmp"]
- yield [*cmdline, *options, "--"]
+ yield [*cmdline, *options]
def apivfs_options(*, root: Path = Path("/buildroot")) -> list[PathString]:
cmdline += ["--ro-bind", "/etc/resolv.conf", "/etc/resolv.conf"]
with vartmpdir() as dir:
- yield [*cmdline, "--bind", dir, "/var/tmp", *options, "--"]
+ yield [*cmdline, "--bind", dir, "/var/tmp", *options]
def finalize_interpreter(tools: bool) -> str: