Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions scripts/populate_tox/populate_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,11 @@ def main() -> dict[str, list]:

write_tox_file(packages)

# Unused cache entries are only pruned on full runs. With --only/--skip,
# skipped integrations don't touch (most of) their cache entries, so pruning
# would wipe them.
prune_cache = not (only_update or skip_update)

# Sort the release cache file
releases = []
with open(RELEASES_CACHE_FILE) as releases_cache:
Expand All @@ -1338,7 +1343,8 @@ def main() -> dict[str, list]:
with open(RELEASES_CACHE_FILE, "w") as releases_cache:
for release in releases:
if (
CACHE[_normalize_name(release["info"]["name"])][
not prune_cache
or CACHE[_normalize_name(release["info"]["name"])][
release["info"]["version"]
]["_accessed"]
is True
Expand All @@ -1353,7 +1359,8 @@ def main() -> dict[str, list]:
with open(DEPENDENCIES_CACHE_FILE, "w") as releases_cache:
for release in releases:
if (
DEPENDENCIES_CACHE[release["python_version"]][
not prune_cache
or DEPENDENCIES_CACHE[release["python_version"]][
release["install_targets_hash"]
]["_accessed"]
is True
Expand Down
Loading