Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upgrading and installing from .ckan in GUI #2680

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

HebaruSan
Copy link
Member

Problems

Upgrading modules in GUI is broken as of #2669. On Windows it throws an exception and crashes, on Linux the Apply changes button doesn't enable.

Cancelling out of a "recommends" based install from .ckan operation in GUI causes assorted issues. In addition to those detailed in #2676, the Apply changes button is enabled despite there being no change set.

Causes

See #2669 for details of the upgrade problem; to sum up, there's now an extra entry in an upgrade change set that throws exceptions when we try to use it. This entry says that its selection reason is Installed, even though the user asked us to upgrade / install it.

GUI's install-from-ckan function can add a Metapackage to the registry (if that's what's in the .ckan file), which thereafter can appear in the mod list, change sets, etc. This can cause problems because it's missing properties that are otherwise always set such as CkanModule.download, and it's not useful to have it there.

FailWaitDialog was enabling the Apply changes button for cancelled installs.

Changes

Now RelationshipResolver will not say the selection reason is Installed when we're installing an upgrade. This avoids the exception that is breaking upgrades.
Fixes #2679.

Now GUI doesn't add Metapackages to the registry. And just in case, the change set logic checks whether a module is a Metapackage before attempting to access the download property. Now FailWaitDialog allows ChangeSetUpdated to govern the enablement of the Apply changes button, so once again it is enabled when there's a change set and disabled when there isn't.
Fixes #2676.

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Pull request labels Feb 5, 2019
@politas politas merged commit 2a729ea into KSP-CKAN:master Feb 8, 2019
@HebaruSan HebaruSan deleted the fix/from-ckan-and-upgrades branch February 8, 2019 15:44
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants