tarides/opam-monorepo

The repository "archive-mirrors" is not respected in a `pull`, thus downloads are always from the Internet.

hannesm opened this issue · 2 comments

When executing opam-monorepo pull (after a lock), it looks up the tarball(s) in the local opam cache, but does not reach out to the archive-mirrors specified in the repo file of the repository(ies).

This leads, especially in low bandwidth scenarios with a network-local cache, to a lot of downloads that could be avoided.

As far as I can tell, at the moment, OpamRepository.pull_tree is used -- which does not respect the repository mirrors, but instead e.g. OpamUpdate.download_package_source could be used.

See answer in ocaml/opam#5313 for details on how to fix opam-monorepo

Thanks @kit-ty-kate, I opened a PR here #337 which fixes the issue.