From: Daan De Meyer Date: Thu, 10 Apr 2025 17:51:17 +0000 (+0200) Subject: Two follow ups for #3678 X-Git-Tag: v26~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19c74d5ba52e1bd8af6e04663acdbbc3dbb3271b;p=thirdparty%2Fmkosi.git Two follow ups for #3678 --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 0fcb26deb..dc6838e55 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4126,8 +4126,8 @@ def run_sandbox(args: Args, config: Config) -> None: env |= {"MKOSI_HOST_DISTRIBUTION": str(hd)} if hr: env |= {"MKOSI_HOST_RELEASE": hr} - if config.tools_tree: - env |= {"MKOSI_DEFAULT_TOOLS_TREE_PATH": os.fspath(config.tools_tree)} + if config.tools() != Path("/"): + env |= {"MKOSI_DEFAULT_TOOLS_TREE_PATH": os.fspath(config.tools())} cmdline = [*args.cmdline] diff --git a/mkosi/config.py b/mkosi/config.py index 90a3bd144..f7fe14bb3 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -5099,7 +5099,7 @@ def parse_config( if config.get("tools_tree") == Path("default"): if in_sandbox(): - config["tools_tree"] = os.environ["MKOSI_DEFAULT_TOOLS_TREE_PATH"] + config["tools_tree"] = Path(os.environ["MKOSI_DEFAULT_TOOLS_TREE_PATH"]) else: tools = finalize_default_tools(context, config, configdir=configdir, resources=resources) config["tools_tree"] = tools.output_dir_or_cwd() / tools.output