My current project is based on Yocto Daisy, with custom layer declarations in one git repo and application code contained in another git repo. The application code lifecycle is somewhat separate from the custom layer lifecycle, so I'd like to be able to capture that in the build.
To that end, I have two recipes that extend core-image: 'my-image' and 'my-image-dev'. I would like to have 'my-image' always use a tagged version of 'application' (such as v0.1, v0.2, etc). I would like to have 'my-image-dev' always use 'application' HEAD from git master.
I have written recipes 'application_0.1.bb' and 'application_git.bb', and tested them in isolation. They behave as expected - 'application_0.1.bb' gets tag 0.1, and 'application_git.bb' gets master.
The problem comes in when I try to instruct a particular image to use a specific version of 'application'. I would have thought this would be as simple as adding PREFERRED_VERSION_application = "0.1"
and PREFERRED_VERSION_application = "git%"
to my image recipes, but this gives me no love. The only places that PREFERRED_VERSION
seems to work is in layer.conf and machine.conf, which doesn't help me since both images are for the same logical machine.
So this is my question - is there a way to declare a dependency on a particular version of a package from a Yocto image?