OK, found the problem.

 

To achieve my objective, the right approach is to add “AGPL-3.0” to INCOMPATIBLE_LICENSE.

This causes the build to fall back to the older version of db.

 

However, I figured this out after finding the following line in poky/meta/conf/distro/include/default-versions.inc:

 

                PREFERRED_VERSION_db-native = ${@incompatible_license_contains('AGPL-3.0', '5.%', '6.%', d)}

 

Is it correct that this is an absolute assignment rather than a conditional one? I think my

PREFERRED_VERSION_db-native assignment would’ve worked if it hadn’t been overridden

by this one.

 

MV

 

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Vuille, Martin (Martin)
Sent: January 19, 2016 8:16 AM
To: yocto@yoctoproject.org
Subject: [yocto] PREFERRED_VERSION for native package

 

Yocto Fido

 

I am trying to use PREFERRED_VERSION to select an earlier version

of the “db” package. The build includes both db and db-native variants

of the package.

 

I set PREFERRED_VERSION_db variable and this successfully changes

the version of the db package but not the db-native package.

 

I tried also setting PREFERRED_VERSION_db-native but this doesn’t

seem to have any effect.

 

What am I missing? How can I override version for a native package?