Skip to content

Commit eb7a28c

Browse files
authored
Fix cache/ path which prevented repodata files from being written (#1121)
* Fix cache/ path which prevented repodata files from being written * add news
1 parent fb7d83a commit eb7a28c

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

constructor/shar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def create(info, verbose=False):
150150
"pkgs/%s.sh" % key,
151151
filter=make_executable if has_shebang(info[key]) else None,
152152
)
153-
cache_dir = join(tmp_dir, "cache")
153+
cache_dir = join(tmp_dir, "pkgs", "cache")
154154
if isdir(cache_dir):
155155
for cf in os.listdir(cache_dir):
156156
if cf.endswith(".json"):

news/1121-repodata-cache

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Enhancements
2+
3+
* <news item>
4+
5+
### Bug fixes
6+
7+
* Ensure cached repodata files are shipped in SH installers. (#1119 via #1121).
8+
9+
### Deprecations
10+
11+
* <news item>
12+
13+
### Docs
14+
15+
* <news item>
16+
17+
### Other
18+
19+
* <news item>

tests/test_examples.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ def test_example_miniforge(tmp_path, request, example):
547547
check_sentinels=installer.suffix != ".pkg",
548548
uninstall=False,
549549
)
550+
# Check that key metadata files are in place
551+
assert install_dir.glob("conda-meta/*.json")
552+
assert install_dir.glob("pkgs/cache/*.json") # enables offline installs
550553
if installer.suffix == ".pkg" and ON_CI:
551554
basename = "Miniforge3" if example == "miniforge" else "Miniforge3-mamba2"
552555
_sentinel_file_checks(input_path, Path(os.environ["HOME"]) / basename)

0 commit comments

Comments
 (0)