[bitbake-devel] How to detect change on a repo manifest.git and rebuild the recipe with "repo://"

Leonardo Sandoval leonardo.sandoval.gonzalez at linux.intel.com
Fri Aug 25 15:11:38 UTC 2017


On Fri, 2017-08-25 at 02:06 +0000, GUAN Ben (ST-FIR/ENG1-Zhu) wrote:
> The source code of my SW consist of multiple components from different
> repository, which is managed by a repo manifest repository. So I want
> to use “repo://” for the repo manifest repository instead of multiple
>git://” to include all repositories in the SRC_URI.
>  
> I add the following to MyRecipe_git.bb:
> ```
> SRC_URI =
>repo://git@<MY_HOST>/manifest.git;protocol=ssh;branch=master”
>  
> S = “${WORKDIR}/repo/MyRecipe”
> ```
>  
> And in my local.conf, I add the following:
> ```
> # Use this setting because I don’t have internet connection to
> external Android repo.git, I mirror one in the internal host
> REPO_URL = “git@<My_HOST>/repo.git”
> # Use “repo” command in the host
> HOSTTOOLS += “repo”
> # Because the my Yocto meta-layers are managed by repo also, use a
> different directory for my recipe 
> REPODIR = “/home/benguan/projects/MyRecipeRepo”
> ```
>  
> Now I can build my recipe with Yocto, but there is an issue:  When
> there is any change required in the repositories of my application, I
> will change the code and update the tags in default.xml of
> manifest.git. I want Yocto could detect this change, fetch the change,
> them rebuild the recipe.  


the easiest would be to 'repo sync & bitbake'. bitbake just handles its
metadata and from it figures out if needs to re-execute a task, so
better if you split the repository update and the bitbake as two
separate processes/steps.

>  
> With “git://”, it is easy to achieve via setting “${AUTOREV}” to
> “SRCREV”. But the fetch2.repo doesn’t support SRCREV. I have go
> through the existing recipe within meta-oe and oe-core, no recipe is
> using “repo://”.
>  
> Does anybody have experience about it and help? Thank you in advance.
>  
> -- 
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel





More information about the bitbake-devel mailing list