KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.99k stars 347 forks source link

Support version numbers in `ckan install` #509

Closed mutability closed 9 years ago

mutability commented 9 years ago

I want to install TweakScale 1.44. The master metadata has 1.47 as the latest (but 1.47 is unfortunately very buggy)

There is a suitable CKAN file for 1.44 here: https://raw.githubusercontent.com/KSP-CKAN/CKAN-meta/master/TweakScale-v1.44.ckan

However, CKAN insists on using 1.47 even if the ckan file to use is explicitly provided:

$ ./ckan.exe install -c TweakScale-v1.44.ckan 
About to install...

 * TweakScale v1.47

Continue? [Y/N] y

Downloading "https://github.com/Biotronic/TweakScale/releases/download/v1.47/TweakScale_1.47.zip"
0 kbps - downloading - 0 MiB left - 99%           
Installing mod "TweakScale v1.47"

Workaround: Change the identifier in the ckan file:

$ ./ckan.exe install -c TweakScale-v1.44.ckan 
About to install...

 * TweakScale-Older v1.44

Continue? [Y/N] y

Downloading "https://github.com/Biotronic/TweakScale/releases/download/v1.44/TweakScale_1.44.zip"
0 kbps - downloading - 0 MiB left - 99%           
Installing mod "TweakScale-Older v1.44"
pjf commented 9 years ago

Aye, this is a bug and it's because our cmdline doesn't let you specify versions. Another work-around (albeit not an elegant one) is to install it and then "upgrade" it to the older version:

ckan install TweakScale
ckan upgrade TweakeScale=v1.44

Our proper solution here should be to allow versions to be specified at install time. (ckan install TweakScale=v1.44). Since the upgrade command already has basic processing for this, and I believe ckan.dll supports installing by CkanModule and not just identifier, this should all just be a simple matter of code.

mutability commented 9 years ago

Cheers, didn't know about the module=version syntax.

Ippo343 commented 9 years ago

This was should have been closed with #592