Skip to content

Commit

Permalink
Revert "Remove tools argument from finaiize_default_initrd()"
Browse files Browse the repository at this point in the history
This reverts commit 75a22e5.
  • Loading branch information
DaanDeMeyer committed Nov 27, 2024
1 parent 14e70bf commit 5103ebb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,7 @@ def finalize_default_initrd(
config: Config,
*,
resources: Path,
tools: bool = True,
output_dir: Optional[Path] = None,
) -> Config:
if config.root_password:
Expand Down Expand Up @@ -1253,7 +1254,7 @@ def finalize_default_initrd(
*(["--hostname", config.hostname] if config.hostname else []),
*(["--root-password", rootpwopt] if rootpwopt else []),
*([f"--environment={k}='{v}'" for k, v in config.environment.items()]),
*(["--tools-tree", str(config.tools_tree)] if config.tools_tree else []),
*(["--tools-tree", str(config.tools_tree)] if config.tools_tree and tools else []),
"--tools-tree-certificates", str(config.tools_tree_certificates),
*([f"--extra-search-path={p}" for p in config.extra_search_paths]),
*(["--proxy-url", config.proxy_url] if config.proxy_url else []),
Expand Down Expand Up @@ -4612,7 +4613,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None:
run_clean(args, config)

if last.output_format != OutputFormat.none:
run_clean(args, finalize_default_initrd(last, resources=resources))
run_clean(args, finalize_default_initrd(last, tools=False, resources=resources))

rmtree(Path(".mkosi-private"))

Expand Down Expand Up @@ -4693,7 +4694,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None:
run_clean(args, config)

if last.output_format != OutputFormat.none:
run_clean(args, finalize_default_initrd(last, resources=resources))
run_clean(args, finalize_default_initrd(last, tools=False, resources=resources))

if tools and not (tools.output_dir_or_cwd() / tools.output).exists():
with prepend_to_environ_path(tools):
Expand Down

0 comments on commit 5103ebb

Please sign in to comment.