Skip to content

Fix skipping failed dependency downloads#4235

Merged
HebaruSan merged 1 commit into
KSP-CKAN:masterfrom
HebaruSan:fix/skip-failed-dl
Oct 18, 2024
Merged

Fix skipping failed dependency downloads#4235
HebaruSan merged 1 commit into
KSP-CKAN:masterfrom
HebaruSan:fix/skip-failed-dl

Conversation

@HebaruSan
Copy link
Copy Markdown
Member

Problem

If you try to install a mod that has a dependency, and the dependency fails to download, and you try to Skip/Retry, CKAN will try to download it again. The only option that works is Abort whole changeset.

Cause

To get the mods from the changeset that depend on the mod we're trying to skip (since we also will not be able to install them), we call Registry.FindReverseDependencies, but we call the version of it that only returns identifiers that are already installed. This means the depending mod won't be returned and won't be removed from the changeset, so when the install is retried, the dependency is pulled back in.

Changes

Now this codepath calls the static Registry.FindReverseDependencies that allows us to specify the overall superset of mods, which we pass as the full changeset. This allows the depending mod to be removed from the changeset so the Skip/Retry operation can succeed.

Fixes #4234.

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Network Issues affecting internet connections of CKAN labels Oct 18, 2024
@HebaruSan HebaruSan merged commit c24e3da into KSP-CKAN:master Oct 18, 2024
@HebaruSan HebaruSan deleted the fix/skip-failed-dl branch October 18, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working as intended GUI Issues affecting the interactive GUI Network Issues affecting internet connections of CKAN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Install from .ckan - Unable to skip mods that fail to download in the "depends" section

1 participant