On Fri, 2024-11-22 at 15:31 +0200, Kareem Ibrahim via lists.openembedded.org 
wrote:
> - This change was intended to abstract user from having to set compile 
> network flag to get remote crates
> - as network access was disabled by default in kirkstone version
> - I faced an do_compile error with bitbaking Qualcomm qcrosvm under yocto 
> kirkstone with message "Could not resolve host: github.com"
> - And after some hours of debugging I noticed that cargo inherited by recipe 
> needs remote crates during do_compile of the cargo.bbclass
> - It was fixed by adding line do_compile[network] = "1" to the recipe
> - So I found it more convenient, since cargo build usually need network 
> access, to abstract users from these details of cargo.bbclass do_compile
> 
> Signed-off-by: Kareem Ibrahim <[email protected]>
> ---
>  meta/classes/cargo-online.bbclass | 7 +++++++
>  1 file changed, 7 insertions(+)
>  create mode 100644 meta/classes/cargo-online.bbclass
> 
> diff --git a/meta/classes/cargo-online.bbclass 
> b/meta/classes/cargo-online.bbclass
> new file mode 100644
> index 0000000000..175c94e09d
> --- /dev/null
> +++ b/meta/classes/cargo-online.bbclass
> @@ -0,0 +1,7 @@
> +# This bbclass is added to abstract recipes writers from
> +# having to set do_compile network flag to 1
> +# if his cargo package need external remote crates
> +# as network access was disabled by default since kirkstone version
> +
> +inherit cargo
> +do_compile[network] = "1"
> \ No newline at end of file
> 

We can't take a change like this unfortunately. Fetching outside
do_fetch means DL_DIR is not populated, our source mirrors would work
and our software/license manifests are incomplete, all things which we
have people relying upon (including for legal review).

As has been mentioned, we have made changes to cargo since kirkstone to
allow all the crates to be specified in SRC_URI so I'd hope there is no
need for this change in more recent versions of the project.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#207642): 
https://lists.openembedded.org/g/openembedded-core/message/207642
Mute This Topic: https://lists.openembedded.org/mt/109721978/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to