]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
cargo_common.bbclass: Support local github repos
authorAlex Kiernan <alex.kiernan@gmail.com>
Fri, 31 Mar 2023 05:45:22 +0000 (07:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Apr 2023 10:36:24 +0000 (11:36 +0100)
commit684a8af41c5bb70db68e75f72bdc4c9b09630810
tree1dbdcf1abfa83e6b12268de4978b02bab93e2e77
parentfb62c4c3dbca4e58f7ce6cf29d4b630a06411a97
cargo_common.bbclass: Support local github repos

Since disable network was added cargo configurations which reference git
repos fail as they attempt to fetch across the network as part of
do_compile, even if EXTRA_OECARGO_PATHS to add them as part of `paths`
is used, as this is documented as only working for packages which exist
in crates.io.

Add parsing of the SRC_URIs for git repos and include `[patch]` sections
to redirect to the checked out source repos which the bitbake fetcher
has already populated.

There are still cases which don't work - if you have multiple copies of
the same repo with different revisions, there's currently no way to
represent that and anything using a repo which has a virtual manifest
will fail to build (see https://github.com/rust-lang/cargo/issues/4934).

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/cargo_common.bbclass