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: Be able to ensure opam install won’t need to download anything #5736

Open
kit-ty-kate opened this issue Nov 22, 2023 · 1 comment

Comments

@kit-ty-kate
Copy link
Member

Context

In a constrained CI environment where you want to make as little network call as possible, it would be nice to be able to setup a local opam cache using opam admin cache with a new argument --packages which, similarly to #5386, which would only download the necessary archives for the packages requested.

However while this ensures that no more download is going to happen when installing most packages, it is not true for all packages. For example if a package defined its url without a checksum or as a git source (examples for both can be found in ocaml-variants in opam-repository), the archive will still need to be re-downloaded since the cache only stores archives with known checksums.

Possible solution

On top of adding --packages to opam admin cache, it would be nice to include non-checksumed packages in the cache in a new directory structure like unverified/<pkg>/url/<archive> and unverified/<pkg>/extra-sources/<archives>. Then users would be able to fetch the unverified archives from the cache using a new option allow-unverified-cache (set to false by default of course)

@kit-ty-kate
Copy link
Member Author

In the same vein it would be nice for opam admin cache to be able to take all the repositories currently set instead of the local directory, as a new argument.

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

1 participant