KSP-CKAN / CKAN

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

CmdLine: Installing from a .ckan file that depends on incompatible mods produces an unhelpful error message #4108

Open philpax opened 3 months ago

philpax commented 3 months ago

Is there an existing issue for this?

Operating System

macOS Sonoma, Apple Silicon

CKAN Version

1.34.4 / Niven

Games

KSP 1

Game Version

KSP 1.12.5

Did you make any manual changes to your game folder (i.e., not via CKAN)?

No response

Describe the bug

I wanted to install the Community Lifeboat Project on my vanilla KSP install on macOS. I installed CKAN from the releases and noted that ConsoleUI had no option for installing ckan files (#4084, which has been fixed in the development branch).

I downloaded the mod list from GitHub and used the command mentioned in that issue to install it (manually navigating to /Applications/CKAN.app/Contents/MacOS to use ckan.exe):

mono ckan.exe install -c ~/Downloads/Community\ Lifeboat\ Modpack2.ckan

but it appears that the modpack itself is being interpreted as a module, resulting in installation failing immediately:

Module installed-Auto-KSP 2024.05.15.01.03.25 required but it is not listed in the index, or not available for your version of KSP
If you're lucky, you can do a `ckan update` and try again.
Try `ckan install --no-recommends` to skip installation of recommended modules.
Or `ckan install --allow-incompatible` to ignore module compatibility.

This name is the identifier of the modlist:

{
    "spec_version": "v1.18",
    "identifier": "installed-Auto-KSP",
    "name": "installed-Auto KSP",
    "abstract": "A list of modules installed on the Auto KSP KSP instance",
    "author": "Myst",
    "version": "2024.05.15.01.03.25",
    "ksp_version_min": "1.12.5",
    "ksp_version_max": "1.12.5",
    "license": "unknown",
    "...": "..."
}

-c is reading the file, as the behaviour is different without the switch:

# mono ckan.exe install ~/Downloads/Community\ Lifeboat\ Modpack2.ckan   
Module [home]/Downloads/Community Lifeboat Modpack2.ckan required but it is not listed in the index, or not available for your version of KSP

This happens with both versions of the modpack .ckan in that thread, and with both local and remote installations (i.e. mono ckan.exe install -c https://raw.githubusercontent.com/mystwalkerKSP/Kerbal-Space-Program-Community-Lifeboat-Project/main/Community%20Lifeboat%20Modpack2.ckan also fails.)

I'm unsure if this is specific to macOS / Rosetta 2; please feel free to narrow the issue if it is. Just to confirm, my game version appears to be correct:

# mono ckan.exe compat list
Version      Actual
-----------  ------
1.12.5.3190  True  

Steps to reproduce

Relevant log output

No response

philpax commented 3 months ago

# mono ckan.exe install $(jq -r '.depends | map(.name) | join(" ")' ~/Downloads/Community\ Lifeboat\ Modpack2.ckan) (i.e. direct CLI installation by injecting the deps into the commandline) fails on AT-Utils, as reported in #4084. Adding --allow-incompatible fixes this.

Is it possible that the failure with AT-Utils is being propagated upwards and being reported as a failure of the modpack?

JonnyOThan commented 1 month ago

Is it possible that the failure with AT-Utils is being propagated upwards and being reported as a failure of the modpack?

Yes that's exactly what's happening. The error message just isn't very helpful.

heyimastopsign commented 3 weeks ago

Is there any way to force override this?

JonnyOThan commented 3 weeks ago

@heyimastopsign This issue is saying that the error message should be changed to something that actually indicates what the problem is. I'm not sure what you want to "force override."

If you mean you want to force ckan to install incompatible mods, it was in the screenshot you posted in the other issue.

image

Note that in general I would recommend setting your CKAN instance to be compatible with 1.8-1.12 (see the user guide, or use ckan compat add 1.8 etc). Mods that aren't compatible in that range are very likely to break your game.

heyimastopsign commented 3 weeks ago

Various attempts by an idiot. I'm really sorry for being so annoying here, but can I be told what I'm doing wrong?

Screenshot 2024-09-10 at 10 29 13 AM
JonnyOThan commented 2 weeks ago

@heyimastopsign can you post the .ckan file you're using? And what version of KSP do you have installed?

heyimastopsign commented 2 weeks ago

@JonnyOThan Sure, here you go. installed-Auto KSP-2024-09-05_21-08-59.ckan.zip

heyimastopsign commented 2 weeks ago

@heyimastopsign can you post the .ckan file you're using? And what version of KSP do you have installed?

Oh, I just realised I didn't let you know what version. It's 1.12.5. Sorry!