I have a recipe that uses a git repo for source code.
Typically while developing, I simply set the SRCREV = "${AUTOREV}" so I retrieve the tip of the branch I am working on.
There are other times where I want to specify a tag in the repo to use instead of the tip. I would like to do this by specifying the tag in local.conf and then checking to see if the tag variable is set in the actual recipe.
Say I set the following in local.conf
BUILDTAG="V1.0"
In my recipe, I would like to set something like:
if len('BUILDTAG') > 0
SRCREV=${BUILDTAG}
else
SRCREV=${AUTOREV}
fi
Is it possible to do something like this?
Is there a better way to do it?
Regards,
Doug Bailey
Hello Doug Bailey,
In theory, it should work. Have you tried it yet?
I’m not sure if there is a standard or recommended way to do it. OtavioSalvador, would you know if there’s a convention on how to achieve this in Yocto?
Regards,
We did solve this problem at O.S. Systems making it easy to centralize all the revisions on a single file and control if the revisions are taken from this file or AUTOREV for development.
It is public at code.ossystems Code Review - meta-ossystems-base.git/blob - classes/ossystems-srcrev-handler.bbclass