This is an automated email from the ASF dual-hosted git repository. akitouni pushed a commit to branch abderrahim/cargo-fixes in repository https://gitbox.apache.org/repos/asf/buildstream-plugins.git
commit 4ed45b36f07c35b0deffa33c80f5fe533b488a41 Author: Jonathan Maw <[email protected]> AuthorDate: Wed Sep 15 15:19:21 2021 +0100 cargo: Fix tracking with aliases and no refs It was reported that `bst track` raised an error when the url had aliases and no refs were specified https://gitlab.com/BuildStream/bst-external/-/issues/53 This appears to have been caused by not marking the url in `configure` when there are no refs. This commit fixes it by always marking the url in `configure`. --- src/buildstream_plugins/sources/cargo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/buildstream_plugins/sources/cargo.py b/src/buildstream_plugins/sources/cargo.py index bcfb841..3486502 100644 --- a/src/buildstream_plugins/sources/cargo.py +++ b/src/buildstream_plugins/sources/cargo.py @@ -353,6 +353,9 @@ class CargoSource(Source): node.validate_keys(Source.COMMON_CONFIG_KEYS + ["url", "ref", "cargo-lock", "vendor-dir"]) + # Needs to be marked here so that `track` can translate it later. + self.mark_download_url(self.url) + self.crates = self._parse_crates(self.ref) def preflight(self):
