-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update fails when a package is installed from a custom registry #128
Comments
Can you test current It has an experimental implementation of generic registry handling, so it should work for your usecase – your package should update from the right registry automatically and you should be able to install it from there via |
It seems to recognize the correct registry, but it tries to open the wrong registry directory:
The correct directory would be |
The Cargo code for this is Very Good and Reproducible:tm:, but I'm pretty sure referenced commit above should do it? |
Seems to work! Thank you for the very fast response and fix! |
…rting in get_index_path() Ref: #128
…ly correct get_index_url() with tests Ref: #128
Released in |
Now it doesn't work anymore and I get
Even though I have an entry with this exact URL in
|
That's interesting... What's your cargo version? I get "cargo 1.41.0 (626f0f40e 2019-12-03)", which gave me errors when I fed it an URL to |
Interesting ... I've also got |
By way of test, can try with this patch, which'll revert to the previous behaviour of passing the URL to the registry (and say if it does so)? It shouldn't work, but ..? diff --git a/src/ops/mod.rs b/src/ops/mod.rs
index cd4fa30f7..fbb2462ff 100644
--- a/src/ops/mod.rs
+++ b/src/ops/mod.rs
@@ -900,11 +900,8 @@ pub fn get_index_url(crates_file: &Path, registry: &str) -> Result<(String, Cow<
}
if Url::parse(&cur_source).is_ok() {
- Err(format!("Non-crates.io registry specified and {} couldn't be found in the config file at {}. \
- Due to a Cargo limitation we will not be able to install from there \
- until it's given a [source.NAME] in that file!",
- cur_source,
- config_file.display()))?
+ eprintln!("WARN: Passing {} as --registry", cur_source);
+ return Ok((cur_source.to_string(), cur_source.to_string().into()));
}
while let Some(repl) = replacements.get(&cur_source[..]) { |
Listing at least works, I'll try to update a package and see what happens. This is the repo by the way, maybe it's about the repo and not the program ... |
Interesting ... with the patch the command show no error, but also the update is not recognized. And without the patch the error is shown. Sorry, I never tested if the updating works, only if the package is listed 🤦♂️ |
😆 zall good, who hasn't been there lol I think you're gonna have to add the source with, at minimum, [source.cloudsmith]
registry = "https://dl.cloudsmith.io/public/solidtux/cargo/cargo/index.git" in your |
My [registries]
solidtux-cargo = { index = "https://dl.cloudsmith.io/public/solidtux/cargo/cargo/index.git" } because the cargo book and the cloudsmith help. But when I add [source.solidtux-cargo]
registry = "https://dl.cloudsmith.io/public/solidtux/cargo/cargo/index.git" as you suggested, everything works. What exactly is the difference between Edit: Apparently the index version is deprecated according to the reference. So it seems that the other sources are just outdated. |
Oh neat, I didn't actually know about those before! This might warrant an issue on cloudsmith's side, too. Glad I could help! |
But it only works, when both entries are present 🤷♂️ Thank you for helping! |
I have a binary which is installed from a custom registry. Now
cargo install-update -l
orcargo install-update -a
fails withIs there a way to search all configured registries or maybe even just skip the failed packages?
The text was updated successfully, but these errors were encountered: