Strip KSP2 build IDs, multi-game for DLC #97
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In KSP-CKAN/KSP2-NetKAN#125 we are updating some KSP2 mods with out of date compatibility for the first time, and the install step is failing with "Module XYZ 1.2.3 required but it is not listed in the index, or not available for your version of KSP2".
Cause
I think this is an issue of the formatting of the game versions. The spec requires game versions to have only 1–3 pieces, not 4, so all KSP2 mods obey this (see KSP-CKAN/CKAN#3969 for another recently addressed complication). But the KSP2 builds JSON file contains 4 pieces, and the meta tester is passing all 4 pieces to
ckan compat add
. I think this makes them not match the modules, so it's behaving as if the compatibility isn't being set.Changes
Now the build ID is stripped from KSP2's game versions.
While working on this I noticed that the DLC command line flags are passed based solely on the game version, not the game itself, so in theory KSP1's DLC flags could be passed for KSP2 if its version numbers get high enough. Now this is moved to
Game.dlc_cmdline_flags
and overridden inKsp1
, so KSP1 DLC will only be set up for KSP1.