Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split SRC_URI list into inc file #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jdegges
Copy link

@jdegges jdegges commented Jun 7, 2023

Usually generated bitbake recipes need to be slightly altered before
they can be used to build the rust project. This might be tweaking some
URLs, adding non-rust dependencies, and a variety of other things.
Typically these changes will be made to the generated recipe and then
checked in to a yocto layer.

As the rust project changes it will usually pull in additional crates
over time. Whenever this happens the recipe will be re-generated and
these changes will need to be merged back in. This is a lot of work to
do when the only change is the addition of one or two crates to the
SRC_URI list.

Let's make this process a little easier by splitting the SRC_URI list
out into a separate inc file and including this in the main recipe. Now
the recipe can be kept up-to-date by just updating the separate inc
file--no more recipe merging.

While we're at it let's also update to edition 2021.

jdegges added 2 commits June 6, 2023 18:08
Updating to edition 2021 requires fixing some minor issues and doing
a cargo update.
Usually generated bitbake recipes need to be slightly altered before
they can be used to build the rust project. This might be tweaking some
URLs, adding non-rust dependencies, and a variety of other things.
Typically these changes will be made to the generated recipe and then
checked in to a yocto layer.

As the rust project changes it will usually pull in additional crates
over time. Whenever this happens the recipe will be re-generated and
these changes will need to be merged back in. This is a lot of work to
do when the only change is the addition of one or two crates to the
SRC_URI list.

Let's make this process a little easier by splitting the SRC_URI list
out into a separate inc file and including this in the main recipe. Now
the recipe can be kept up-to-date by just updating the separate inc
file--no more recipe merging.
@jdegges
Copy link
Author

jdegges commented Jun 8, 2023

@kraj @cardoe please let me know if you have any feedback or suggestions.

@jdegges
Copy link
Author

jdegges commented Jun 22, 2023

+@srwalter @weltling @jmesmon @ColinFinck looks like you've all contributed to meta-rust, any thoughts on this change?

@IniterWorker
Copy link

IniterWorker commented Apr 24, 2024

It might be beneficial to begin utilizing bb recipe foreach dependency. What are your thoughts on it and on incorporating 'include {PN}' and '{PN}-{PV}' similar to the current cargo-bitbake output? Aligning with the Rust shared runtime library when feasible could be advantageous.

Somehow, this approach could assist with #73.

@jo-so
Copy link

jo-so commented Nov 27, 2024

How about adding a command line option --src-uri-fragment that prints the part of the SRC_URI to stdout? This would help with automation and is versatile enough to be used in a build pipeline for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants