Option to override SpaceDock version with AVC version #2406
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
A mod that exists only as a bundled folder in another mod on SpaceDock can't have its own version number in CKAN; it must use the bundling mod's version (see #2405). This misrepresents to the user what's being installed, and makes for an awkward transition if we have to switch the source mod, often requiring an epoch bump.
Cause
A decision was made to never trust version files if we have another source of version info:
CKAN/Netkan/Transformers/AvcTransformer.cs
Lines 154 to 160 in a495f43
Changes
Now there is a way to override the above behavior. If
"x_netkan_trust_version_file"
is set totrue
in a given netkan file, then the"version"
property will be sourced preferentially from the version file, if any.Fixes #2405; my test version generated
DynamicBatteryStorage-2-1.3.0.0.ckan
from the current netkan with that property added, which is the correct version from that bundled mod's version file.