diff --git a/constructor/winexe.py b/constructor/winexe.py index cff693e72..04bed69b5 100644 --- a/constructor/winexe.py +++ b/constructor/winexe.py @@ -278,7 +278,21 @@ def make_nsi( variables["uninstall_with_conda_exe"] = bool(info.get("uninstall_with_conda_exe")) variables["needs_python_exe"] = info.get("_win_install_needs_python_exe", True) - approx_pkgs_size_kb = approx_size_kb(info, "pkgs") + # - `keep_pkgs: true` + `always_copy: true` = tarballs + 2 * extracted + # - `keep_pkgs: true` + `always_copy: false` = tarballs + extracted + # - `keep_pkgs: false` = extracted only + # `keep_pkgs: true` + if info.get("keep_pkgs", False): + # tarballs in pkgs/ + size_tarballs = info.get("_approx_tarballs_size", 0) + # extracted tarballs in pkgs// + size_extracted = info.get("_approx_pkgs_size", 0) + # `always_copy: true` in condarc means installed files are copies, not hard links + if info.get("condarc", {}).get("always_copy", False): + size_extracted = 2 * size_extracted + approx_pkgs_size_kb = int((size_tarballs + size_extracted) / 1000) + else: + approx_pkgs_size_kb = approx_size_kb(info, "pkgs") # UPPERCASE variables are unescaped (and unquoted) variables["CONDA_LOG_ARG"] = ( diff --git a/news/1330-disk-size-estimate-updates b/news/1330-disk-size-estimate-updates new file mode 100644 index 000000000..86021a691 --- /dev/null +++ b/news/1330-disk-size-estimate-updates @@ -0,0 +1,19 @@ +### Enhancements + +* Adjusts the way that the estimated disk usage is calculated, based on more `construct.yaml` variables. (#1330 via #1331) + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* + +### Other + +*