sophie-h commented on code in PR #62:
URL:
https://github.com/apache/buildstream-plugins/pull/62#discussion_r1537588190
##########
src/buildstream_plugins/sources/cargo.py:
##########
@@ -386,15 +704,24 @@ def track(self, *, previous_sources_dir):
return new_ref
def stage(self, directory):
-
# Stage the crates into the vendor directory
vendor_dir = os.path.join(directory, self.vendor_dir)
+
+ git_repos = set()
for crate in self.crates:
crate.stage(vendor_dir)
+ if isinstance(crate, CrateGit):
+ git_repos.add(crate.repo)
+
+ # Every git repo needs an extra entry in the config
+ # Using a set since the config entry cannot appear twice
+ vendor_cfg_git = ""
+ for repo in git_repos:
+ vendor_cfg_git += _git_vendor_config_template.format(git_repo=repo)
# Stage our vendor config
vendor_config = _default_vendor_config_template.format(
- vendorurl=self.translate_url(self.url), vendordir=self.vendor_dir
+ vendorurl=self.translate_url(self.url), vendordir=self.vendor_dir,
git_vendors=vendor_cfg_git
Review Comment:
I'm still pretty sure this must be wrong. Maybe I will find the time to test
this outside of STF.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]