Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Multiple KSP Instances -> share downloads #960

Closed
valuial opened this issue May 26, 2015 · 14 comments · Fixed by #2535
Closed

Feature Request: Multiple KSP Instances -> share downloads #960

valuial opened this issue May 26, 2015 · 14 comments · Fixed by #2535
Assignees
Milestone

Comments

@valuial
Copy link

valuial commented May 26, 2015

I have more than one KSP instance, at least one Main copy, a testing copy for bug-hunting, and soonish one to test new mods for compatibility without feeding my saves to the Kraken.

Most mods are shared between them - even in the same versions.
I'd like ckan to store the downloaded archives in a centralized location (config setting for this? env i.e. $CKAN-DOWNLOADS) so I don't have to download a mod 3 times, when one time is enough, also saves HD storage.

Short term workaround could be to have ckan look in the other known installs for the required download.

@mgsdk
Copy link
Contributor

mgsdk commented May 26, 2015

Duplicate of https://github.com/KSP-CKAN/CKAN-core/issues/10, which should probably be moved over here (or will be as the repos merge again).

@mgsdk
Copy link
Contributor

mgsdk commented May 26, 2015

I can also see I had some old code for this, might need a bit of checking before it can be merged in. For anyone who wants to see it: https://github.com/mgsdk/CKAN-core/tree/cache_downloads.

@valuial
Copy link
Author

valuial commented May 27, 2015

I didn't mentioin it explicitly, but I wanted to imply using metadata across KSP install paths as well.

@mgsdk
Copy link
Contributor

mgsdk commented May 27, 2015

So you want to update the repository once, and have it updated for all KSP installs?

@valuial
Copy link
Author

valuial commented May 27, 2015

Yes. Unless there is a reason to have a different metadata set for a KSP install? Then there should be some way to configure this I guess.

@Dazpoet
Copy link
Member

Dazpoet commented May 27, 2015

Just throwing it out there that some of us use different repositories for different installs, e.g. my main install use the standard and MechJeb2-dev repos while some of my testinstalls use all the canonical repositories. If the same metadata list was used for all installs wouldn't this behaviour become impossible?

@pjf
Copy link
Member

pjf commented May 28, 2015

Sharing metadata between installs is harder than it looks, not least because one may have different (and multiple) upstreams for each install.

We do have some potential ways to make it more efficient to fetch metadata. As a first pass, flipping from .zip to .tar.gz downloads (I know we've got a ticket for this somewhere), but further in the future we'll likely have a bot that cooks the metadata to only return compatible and/or latest versions.

But seriously, switching to .tar.gz will drop metadata download size by a lot, as it seriously takes advantage of the repetition that exists between files.

@pjf pjf added the Support Issues that are support requests label May 28, 2015
@netkan-bot
Copy link
Member

Hey there! I'm a fun-loving automated bot who's responsible for making sure old support tickets get closed out. As we haven't seen any activity on this ticket for a while, we're hoping the problem has been resolved and I'm closing out the ticket automaically. If I'm doing this in error, please add a comment to this ticket to let us know, and we'll re-open it!

@pjf pjf removed the Support Issues that are support requests label Jun 5, 2015
@RichardLake RichardLake reopened this Jun 5, 2015
@valuial
Copy link
Author

valuial commented Jun 11, 2015

@netkan-bot s/automaically/automatically/

@politas
Copy link
Member

politas commented Dec 30, 2015

This would be good to have. The number of times I've had CKAN crash while downloading the same files I know I already have downloaded for another install...

@valuial
Copy link
Author

valuial commented Jan 27, 2016

Not sure if metadata is required, but what about only sharing the mod downloads? Downloaded that mod for another instance, so you just get the file from the common folder, and merge it with the active instance...

@godarklight
Copy link
Contributor

I already do this on linux by symlinking the downloads/ folder

@politas
Copy link
Member

politas commented Feb 25, 2016

If installs have different upstreams, wouldn't that make the hashes different, anyway, so the downloads should co-exist without issues, just as different KSP versions will likely use many different downloads. So even if metadata sharing isn't possible, mod download sharing is?

@HebaruSan
Copy link
Member

HebaruSan commented May 7, 2018

A crazy thought just hit me: It ought to be possible to approximate this without re-architecting by simply making the cache search span all the caches. So if I have three instances, and I want to install ModuleManager-3.0.7, I look in all three of those instances' caches for it (using the current algorithm of looking for a file with a matching 8-char hex prefix). If it's found, install from that file; otherwise download and save in the cache of the current instance.

This would eliminate redundant downloads and reduce disk usage, just like a true "global" cache. And we wouldn't have to worry about merging separate caches or making the path configurable, etc. The saving code could be left completely alone.

I'd still prefer a clean scheme where all instances share one configurable cache folder, but this option does intrigue me.

Well look at that, the OP does mention that. Just ignore me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants