Automate updating of SRCREV

Oliver Westermann


maybe somebody already has something for this before I reinvent the wheel ;-) We've several internal tools that mostly have their own CI and are referenced in our yocto layers to be picked up by the nightly build. Usually we manually update the SRCREV and add a `git log --oneline --no-decorate <old_rev>...<new_rev>` into the update commit. That way you can easily scroll over your eg kernel repo to figure out which commit went in when. But by now we have more and more internal tools, all require regular updates so we would like to add a little CI task to update our SRCREVs.

Is there an easy way to tell bitbake / devtool to change a variable like SRCREV? I played around with various combinations of devtool modify, update-recipe and edit-recipe, but I could not get it to work as I expect.

My current goal for my script would be to use a flow roughly following this:

* Get the repo URL & branch from SRC_URI (eg by a bitbake -e <recipe> and some grep magic)
* Do a shallow clone in a temp dir
* Get new HEAD commit for branch, compare with current
* create git log for commit message
* update REV in recipe
* commit

Looking forward to suggestions, Olli

Join { to automatically receive all group messages.