Re: cargo patch override
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <[email protected]> |
Running into the same issue when using bitbake with a repo with multiple crates. We had to add a 'cratedir' parameter to temporarily work around this problem. We can try your patch - Emmanuel Jee
0001-cargo-Add-support-for-multiple-crates-in-same-repo.patch
(text/x-patch, 979 B)
diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass
index c528ae7f39..3aadbebb91 100644
--- a/meta/classes-recipe/cargo_common.bbclass
+++ b/meta/classes-recipe/cargo_common.bbclass
@@ -150,7 +150,11 @@ python cargo_common_do_patch_paths() {
repo = '%s://%s@%s%s' % (ud.proto, ud.user, ud.host, ud.path)
else:
repo = '%s://%s%s' % (ud.proto, ud.host, ud.path)
- path = '%s = { path = "%s" }' % (name, os.path.join(workdir, destsuffix))
+ cratedir = ud.parm.get('cratedir')
+ if cratedir is not None:
+ path = '%s = { path = "%s" }' % (name, os.path.join(workdir, destsuffix, cratedir))
+ else:
+ path = '%s = { path = "%s" }' % (name, os.path.join(workdir, destsuffix))
patches.setdefault(repo, []).append(path)
with open(cargo_config, "a+") as config: