diff --git a/constructor/shar.py b/constructor/shar.py index 8475fca38..745f95c61 100644 --- a/constructor/shar.py +++ b/constructor/shar.py @@ -150,7 +150,7 @@ def create(info, verbose=False): "pkgs/%s.sh" % key, filter=make_executable if has_shebang(info[key]) else None, ) - cache_dir = join(tmp_dir, "cache") + cache_dir = join(tmp_dir, "pkgs", "cache") if isdir(cache_dir): for cf in os.listdir(cache_dir): if cf.endswith(".json"): diff --git a/news/1121-repodata-cache b/news/1121-repodata-cache new file mode 100644 index 000000000..a835cea27 --- /dev/null +++ b/news/1121-repodata-cache @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Ensure cached repodata files are shipped in SH installers. (#1119 via #1121). + +### Deprecations + +* + +### Docs + +* + +### Other + +* diff --git a/tests/test_examples.py b/tests/test_examples.py index a2ae8ad85..3fc38104f 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -547,6 +547,9 @@ def test_example_miniforge(tmp_path, request, example): check_sentinels=installer.suffix != ".pkg", uninstall=False, ) + # Check that key metadata files are in place + assert install_dir.glob("conda-meta/*.json") + assert install_dir.glob("pkgs/cache/*.json") # enables offline installs if installer.suffix == ".pkg" and ON_CI: basename = "Miniforge3" if example == "miniforge" else "Miniforge3-mamba2" _sentinel_file_checks(input_path, Path(os.environ["HOME"]) / basename)