Better version specific relationships at install and upgrade#4023
Conversation
|
Hi @lamont-granquist, @NathanKell, and @JonnyOThan, would you have time to test these changes in the next few days? The build is under the Artifacts dropdown on the Checks tab. I'd appreciate knowing about any problems you discover. |
|
Oooh, that's cool! Sadly I'm very swamped with non-KSP stuff atm so I make no promises. :( (Especially sucks given how desirable I find this, and how grateful I am!) Gonna ping @siimav and @Capkirk123 as other folks who might be able to provide help here. |
746ed49 to
b94d966
Compare
d0af0ed to
eb3eb64
Compare
eb3eb64 to
b702e1e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
b702e1e to
0f7ca67
Compare
|
Finally got this into a state I'm happy with. The We did not manage to assemble a volunteer testing corps for this, so might as well merge now... |
I've been sitting on these changes for a while because I wasn't quite happy with the implementation, but I think it's about as good as it's going to get for now, and I want to get it off my plate to focus on other issues.
Problem
If you install a mod that has a version-specific dependency on an older version of another mod, CKAN will appear to treat that other mod as upgradeable, but the upgrade will fail if attempted. Intermediate versions that could satisfy all requirements will not be discovered automatically, but may be selected manually by the user.
E.g.,
RP-0recently did this:Versions after that are meant to be used only with
RP-1. ButRealismOverhaulwill still show up as upgradeable, and trying to upgrade it will fail.Cause
AvailableModule.DependsAndConflictsOKdoesn't check version requirements of other modules that depend on the given moduleChanges
IRegistryQuerier.HasUpdatenow accepts a list of other modules that are used to limit the compatible versions of the given modIRegistryQuerier.CheckUpgradeableis created to provide more complex upgrading logic; it first finds the latest available versions of all installed mods, then uses their relationship constraints to roll back one another until a consistent changeset is generated. This function is now used by:GUIMod.HasUpdatefrom outsideGUIModckan upgrade --allckan list's status charactersckan upgradeworks as intendedFixes #3849.
Fixes #3945.