]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Make tools a boolean argument
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 15 Apr 2024 09:22:15 +0000 (11:22 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 15 Apr 2024 09:22:15 +0000 (11:22 +0200)
mkosi/__init__.py
mkosi/config.py

index f8c9cf8c2f32a1fb2f2dbb5d8d8b5f53b3f9f336..eee48625bf7af73640ac2e8b67e83f3dc3f4d074 100644 (file)
@@ -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),
index 14c4eb8308415fe3ad9fd1f476d6db1a6124991d..e56b8fe6a69b399a428ec8c2624b029cef721325 100644 (file)
@@ -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,