[yocto] PREFERRED_VERSION ignored

Mark Hatle mark.hatle at windriver.com
Mon Mar 11 12:17:00 PDT 2019

On 3/11/19 12:46 PM, Marco wrote:
> Hello,
> using Yocto version 'rocko' I have a custom layer defining a new
> recipe and a distro.
> I have a recipe openssl_1.0.1u.bb in my meta-custom layer.
> My meta-custom layer.conf has BBFILE_PRIORITY_meta-custom = "9"
> In my meta-custom layer I have a distro configuration saying
> PREFERRED_VERSION_openssl = "1.0.2o" so I expected to build 1.0.2o but
> when I build bitbake openssl is always selected the 1.0.1u
> Same problem if I set PREFERRED_VERSION_openssl = "1.0.2o" in the local.conf
> Is there an issue or am I doing something wrong?

I've seen this issue before.  There are issues with layer priority as well as
recipe priority.  The only way I've dealt with this is by blacklisting specific
versions of recipes...

PNBLACKLIST[<recipe>] ?= "${@'Only version ' +
d.getVar('PREFERRED_VERSION_${BPN}') + ' (not ${PV}) is supported in this
configuration. ' if d.getVar('PREFERRED_VERSION_${BPN}') and not
d.getVar('PV').startswith(d.getVar('PREFERRED_VERSION_${BPN}').replace('%', ''))
else ''}"

(note the above is one single line)


> --
> Marco

More information about the yocto mailing list