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

Add an environment variable to relocate the download-cache folder #6247

Open
mtelvers opened this issue Oct 17, 2024 · 0 comments
Open

Add an environment variable to relocate the download-cache folder #6247

mtelvers opened this issue Oct 17, 2024 · 0 comments

Comments

@mtelvers
Copy link
Contributor

It would be very helpful if an environment variable could be used to configure the location of the $OPAMROOT/download-cache. Currently, download-cache is hardcoded.

let download_cache root = root / "download-cache"

In obuilder, we persist the opam cache between jobs by mounting a file system on the download-cache location. This works well under Linux/FreeBSD/macOS, but under Windows mounting is more problematic. Windows provides the mountvol command to do this. mountvol requires an empty directory where we typically don't have one; it also requires the volume to be specified in the \\?\Volume{guid} format, which is an additional overhead to calculate. It would be great to be able to have an environment variable like OPAMDOWNLOADCACHE=d:\download-cache.

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

No branches or pull requests

2 participants