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:
[x] Added an impl on CrateEntry to be able to obtain reference to crate's name and version.
[x] Passed visibility of CrateEntry.yanked to pub(crate)
[x] Adding a module (verify.rs) containing the logic.
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
, althoughpanamax
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:
impl
onCrateEntry
to be able to obtain reference to crate's name and version.CrateEntry.yanked
topub(crate)
verify.rs
) containing the logic.