Skip to contentSkip to conversation

Make recipe conditionally download code from Git Repo #yocto

DISCUSSION [email protected] 2 participants 5 messages Dec 10, 2022

lore
Share & tools
lore
#0 lore raw

I have a recipe for an application. I want it to download its code from the Git repo only if it does not already exist at a specific location on the file system. How can I go about achieving this?

Thanks

#1 lore raw

Can you explain the context and use case please?

Alex

Quoted 18 lines · ali.ahmad via lists.yoctoproject.org

I have a recipe for an application. I want it to download its code from the Git repo only if it does not already exist at a specific location on the file system.
How can I go about achieving this?

Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#58774):
https://lists.yoctoproject.org/g/yocto/message/58774
Mute This Topic: https://lists.yoctoproject.org/mt/95580174/1686489
Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Thank you for getting back.

Context/Use case:
My current recipe always checks out code from the git repo before building it.
During development, I want to first build my code successfully before pushing it to the repo. Hence I want the recipe to check if the code exists at a certain location on the file system. If it does, it should build that. If it doesn't it should checkout the code from the repo before building it.

Thanks

#3 lore raw
Quoted 7 lines · ali.ahmad via lists.yoctoproject.org

Thank you for getting back.

Context/Use case:
My current recipe always checks out code from the git repo before building it.
During development, I want to first build my code successfully before pushing it to the repo. Hence I want the recipe to check if the code exists at a certain location on the file system. If it does, it should build that. If it doesn't it should checkout the code from the repo before building it.

'devtool modify' should help with that. It will clone the source code into a 'workspace' folder, and set up a .bbappend in the same workspace that would instruct bitbake to build from that location instead of fetching from git. When you're done, there are several other 'devtool' subcommands to finish up, and revert to building from git.

Alex