KSP-CKAN / CKAN

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

Option to skip dependency checks during install or removal #1008

Closed netkan-bot closed 8 years ago

netkan-bot commented 9 years ago

Issue by SpaceTeph Saturday Jan 10, 2015 at 17:11 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT Originally opened as https://github.com/KSP-CKAN/CKAN-cmdline/issues/40


I am currently busy trying to port Astronomer's Pack to CKAN. This involves writing new configuration packages; those usually have a circular dependency to their parent mod; the core mod needs at least one configuration, and the configuration will not work without the parent mod.

CKAN solves those gracefully during installation and removal from the online repository, but I cannot figure out a way to test my packages locally. Is there any? If not, my guess is that we would need an option to skip dependency checks during the installation or removal of some packages.

In the present case, this would allow me to remove EVE's default configuration and replace it with Astronomer's, which I am writing. Currently I just can't do this because removing the config forces the removal of the core mod. Of course I could download the CKAN files for EVE, modify them to remove the circular dependency and install them with -c to test it all, but there should be a better way in the long run...

netkan-bot commented 9 years ago

Comment by hakan42 Saturday Jan 10, 2015 at 17:23 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


Let me mark this as an enhancement. I can't think of any other way but manipulating the local ckan files.

Actually, one other way might be the registry manipulator addon in the CKAN gui version, but I am not aware of how much power that thing gives you over the dependencies. Pinging @AlexanderDzhoganov on this one as he is the primary author.

netkan-bot commented 9 years ago

Comment by SpaceTeph Saturday Jan 10, 2015 at 17:29 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


Okay. A look in the source code is telling me that it might just be possible to skip the checks by setting without_enforce_consistency to true in the RelationshipResolverOptions used when installing/removing. I'd like to give it a spin. Guess it's time to go install Xamarin :D

netkan-bot commented 9 years ago

Comment by hakan42 Saturday Jan 10, 2015 at 17:36 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


That's how it started with me too... First you send issues, then you install git and send PR's, then you install Xamarin, and before you know it, you become a core developer :smiling_imp:

Now, where did all that time go that I wanted to save by using CKAN and put into more KSP play time?

netkan-bot commented 9 years ago

Comment by SpaceTeph Saturday Jan 10, 2015 at 17:44 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


Hehheheh, yes. I've stopped to play KSP a while ago after burning out in 0.20 or so - afterwards installing and updating the mods was taking more time than playing. CKAN first convinced me to come back, but I'd been waiting for some of my favorite mods to come up in the repository - and by now I'm porting them myself. It's a slippery slope XD

netkan-bot commented 9 years ago

Comment by SpaceTeph Saturday Jan 10, 2015 at 18:51 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


Okay, it would be quite much more tricky than that - the internal registry does a lot of consistency checks. I have made it possible to remove a package while skipping the checks, but as soon as one tries to install something else later, a consistency check is made and ckan.exe throws an inconsistent registry exception, which is somewhat correct. A basic assumption of CKAN seems to be that the registry has to be consistent at all times; in this case, adding an option to skip the dependency checks would be a very bad idea.

netkan-bot commented 9 years ago

Comment by SpaceTeph Saturday Jan 10, 2015 at 19:57 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


In order to enable the testing of mods with circular dependencies, I might just make the -c parameter of the install command a list so that several CKAN files can be installed at once. Like this one can give the entire (circular) dependency hierarchy to install at once, and there is no need to deactivate the dependency checks.

mheguy commented 8 years ago

This hasn't been active in over a year. There are other issues requesting that relationships be ignored, and in the interim this is addressed by simply altering/removing the relationships from local .netkans/.ckans during local testing. When submitted to Jenkins, it accurately tests the relationships.