You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ak...@apache.org on 2023/10/17 09:06:43 UTC

[buildstream-plugins] 01/01: cargo: call mark_download_url with the correct url

This is an automated email from the ASF dual-hosted git repository.

akitouni pushed a commit to branch abderrahim/fix-cargo-mirroring
in repository https://gitbox.apache.org/repos/asf/buildstream-plugins.git

commit d021596f767ab76f2e3729b92b537b9228e4f0d5
Author: Abderrahim Kitouni <ab...@codethink.co.uk>
AuthorDate: Tue Oct 17 10:06:13 2023 +0100

    cargo: call mark_download_url with the correct url
    
    We want to give it the untranslated url, so that mirroring works. We also
    should use the url that is defined in the config (i.e. the base url rather
    than the constructed url for the crate)
---
 src/buildstream_plugins/sources/cargo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream_plugins/sources/cargo.py b/src/buildstream_plugins/sources/cargo.py
index 26d3745..09aef6f 100644
--- a/src/buildstream_plugins/sources/cargo.py
+++ b/src/buildstream_plugins/sources/cargo.py
@@ -109,7 +109,7 @@ class Crate(SourceFetcher):
         self.name = name
         self.version = str(version)
         self.sha = sha
-        self.mark_download_url(self._get_url())
+        self.mark_download_url(cargo.url)
 
     ########################################################
     #     SourceFetcher API method implementations         #