wrong paths / urls
panzerballett opened this issue · 7 comments
i have a mirror and it worked well. but recently cargo can no longer download all crates. some work - others to not.
an example:
$ cargo build
Updating `panamax` index
Downloaded io-lifetimes v1.0.6 (registry `panamax`)
error: failed to download from `http://panamax.internal/crates/3/l/log/0.4.17/log-0.4.17.crate`
Caused by:
failed to get successful HTTP response from `http://rust.cry/crates/3/l/log/0.4.17/log-0.4.17.crate`, got 404
on the server there is a file /mnt/rust/crates/3/log/0.4.17
but not /mnt/rust/crates/3/l/log/0.4.17
(note the l
in the middle).
there are creates which are twice in the mirror (some only up to an older version). an example:
older versions:
$ ls 3/syn/
0.10.0 ... 1.0.107
the most recent version:
$ ls 3/s/syn/
0.10.0 ... 1.0.109
but this naming is not consistent:
$ ls 3/x
xcp xot
but:
$ ls -d 3/x??
3/x11 3/x1b 3/xal ... 3/xvi 3/xxv 3/xyn
for the moment i am not able to build a project containing the syn
or the log
crate. i can neither get it to work using nginx rewrite rules nor with panamax serve
.
The nginx rewrite rules have been more or less deprecated by the serve
command, however if this is affecting both then it's likely not the culprit. It sounds like you might just be missing packages, caused by an earlier bugfix that changed the layout of the 3
directory.
First, make sure you're running the latest Panamax (right now, 1.0.12). If you're not sure, then fully uninstall and reinstall it just in case.
Then, try running panamax verify
. That should check for missing files and ask for you to download them.
If the verify command doesn't work, delete the crates.io-index
directory and try running panamax sync
again.
If that doesn't work, then you might need to completely delete the mirror directory and rebuild it from scratch (i.e. run panamax init
on a new directory).
Hope that helps!
panamax
is the latest version:
$ cargo install --list
panamax v1.0.12:
panamax
panamax verify
did indeed download tons of crates.
am running panamax sync
now.
i really try to avoid starting fresh...
will report back next week. thanks a lot for your help!
panamax verify
seems to have resolved all the issues! thanks a lot!
i am still using nginx with no rewrite rules.
i am automatically syncing my mirror every night. would id be a good idea to run panamax verify
non-interactively after panamax sync
?
It's probably not necessary. I'd only run it after changing configuration or updating Panamax itself, however for peace of mind, it might not be a bad idea to run it e.g. once a week or something.
ok. thanks for that!
it still seems that i have duplicates in my mirror (e.g. the example above with 3/x/
and ``3/x??). is there a way to get rid of those (without having to start over)?
I think you should just be able to delete 3/x??
(since that's the invalid one) and you should be good. Alternatively, delete both of those directories and rerun verify
.
great, thanks again!
i guess that closes the issue.