From: Daan De Meyer Date: Mon, 15 Apr 2024 09:22:15 +0000 (+0200) Subject: Make tools a boolean argument X-Git-Tag: v23.1~111^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a8073da413248d691e38fe3ff99e6dae63dbfdf;p=thirdparty%2Fmkosi.git Make tools a boolean argument --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index f8c9cf8c2..eee48625b 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -460,7 +460,7 @@ def run_configure_scripts(config: Config) -> Config: ["/work/configure"], env=env | config.environment, sandbox=config.sandbox( - tools=Path("/"), + tools=False, mounts=[*sources, Mount(script, "/work/configure", ro=True)], options=["--dir", "/work/src", "--chdir", "/work/src"] ), @@ -4175,7 +4175,7 @@ def run_clean_scripts(config: Config) -> None: ["/work/clean"], env=env | config.environment, sandbox=config.sandbox( - tools=Path("/"), + tools=False, mounts=[ *sources, Mount(script, "/work/clean", ro=True), diff --git a/mkosi/config.py b/mkosi/config.py index 14c4eb830..e56b8fe6a 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -1688,7 +1688,7 @@ class Config: network: bool = False, devices: bool = False, relaxed: bool = False, - tools: Optional[Path] = None, + tools: bool = True, scripts: Optional[Path] = None, mounts: Sequence[Mount] = (), options: Sequence[PathString] = (), @@ -1707,7 +1707,7 @@ class Config: devices=devices, relaxed=relaxed, scripts=scripts, - tools=tools or self.tools(), + tools=self.tools() if tools else Path("/"), mounts=mounts, options=options, extra=extra,