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 2024/04/07 17:15:35 UTC
(buildstream-plugins) 01/02: cargo: Use the new suffix parameter to translate_url
This is an automated email from the ASF dual-hosted git repository.
akitouni pushed a commit to branch abderrahim/bearer-auth
in repository https://gitbox.apache.org/repos/asf/buildstream-plugins.git
commit 5302a1fc35a3b0d7072504299882a5c20f7ae3a0
Author: Abderrahim Kitouni <ab...@codethink.co.uk>
AuthorDate: Tue Mar 5 15:05:45 2024 +0100
cargo: Use the new suffix parameter to translate_url
Depending on the case, we might be unable to know whether the url provided
has a trailing slash or not (e.g. if it is an alias). To work around that,
we try to append a trailing slash to the specified URL if necessary, without
breaking cache keys.
This behaviour can be incompatible with 2.0 in some cases, but is the
behaviour requested in https://github.com/apache/buildstream-plugins/pull/52
To keep the compatibility with older buildstream versions, we check the
version and only use suffix with buildstream >= 2.2.
Co-authored by: Jürg Billeter <j...@bitron.ch>
---
src/buildstream_plugins/sources/cargo.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/buildstream_plugins/sources/cargo.py b/src/buildstream_plugins/sources/cargo.py
index 42fcaa3..e30cd06 100644
--- a/src/buildstream_plugins/sources/cargo.py
+++ b/src/buildstream_plugins/sources/cargo.py
@@ -35,8 +35,8 @@ obtain the crates automatically into %{vendordir}.
# Specify the cargo source kind
kind: cargo
- # Url of the crates repository to download from (default: https://static.crates.io/crates)
- url: https://static.crates.io/crates
+ # Url of the crates repository to download from (default: https://static.crates.io/crates/)
+ url: https://static.crates.io/crates/
# Internal source reference, this is a list of dictionaries
# which store the crate names and versions.