panamax-rs / panamax

Mirror rustup and crates.io repositories, for offline Rust and cargo usage.
Apache License 2.0
443 stars 46 forks source link

Adding feature to verify coherence between local index and mirror #57

Closed ricked-twice closed 2 years ago

ricked-twice commented 2 years ago

Hi there! :wave:

So here the things, a few days ago, I was using panamax and decided to synchronize my mirror (after maybe one month or two without doing it). What happened is exactly what is described on issue#55 (which is now closed by the author).

To sum up, I had my mirror in an inconsistent state: index was referencing a crate, but this one was not present on my mirror. This happened right after panamax sync /path/to/my/mirror, although panamax stated the sync was a success. As I really needed an up-to-date mirror, I deleted the mirror and ran a fresh new sync. And then it worked, my mirror was coherent with the index.

But, the problem remains. I tried to trigger it again, but without any success. So I decided to do add a quick feature to detect this kind of problem.

Of course do not hesitate to say what you think about my contribution (this is my first one ever :metal: ) and feel free to modify it.

Main changes:

k3d3 commented 2 years ago

Looks great, thank you!