-
Notifications
You must be signed in to change notification settings - Fork 359
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
Opam admin cache add --secondary-cache flag #4352
Comments
I think adding the cache to If the latter works, ocaml/opam-repository#17355 should actually be enough to do the trick. Note however that this approach means that the cache will always be hit before trying the upstream URL, which differs from what you were asking. |
I appended the following to
This did not work. I then checked the values in
This means that opam knows about this cache location somewhere. However, it doesn't know that the git clone that I'm using is the same as this cache, so it doesn't look. I then modified the mirrored repo directly, adding the opam URL to
This also did not work. Was there another value you wanted me to try modifying somewhere? It really appears that |
Thanks for testing! |
Thank you very much! I am constantly supporting offline development environments at my workplace, so a solution is very welcome. |
This affects opam 2.0.7.
Given that many artifact URLs become obsolete over time, users requiring an offline clone of the opam repository need a way to fetch missing artifacts from other opam repository caches.
Many source URLs in the opam repository are becoming obsolete. For example, bitbucket has stopped serving archives of mercurial repositories. Running
opam admin cache
will never fully populate these entries even though the artifacts are still present on opam.ocaml.org in the cache.I would like
opam admin cache
to add a flag--secondary-cache
that names the url of an opam cache directory to use when directly fetching an artifact fails. This way, artifacts can be located when a URL cannot be resolved or a checksum is wrong.The text was updated successfully, but these errors were encountered: