From: Scott Rifenbark Date: Tue, 13 Sep 2016 18:40:43 +0000 (-0700) Subject: ref-manual: Added note to PREFERRED_VERSION X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4824bb4fdaf0778620658d1a901509ad76ad2092;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git ref-manual: Added note to PREFERRED_VERSION fixes [YOCTO #10252] Added a note to help avoid confusion regarding the version specification used in PREFERRED_VERSION. (From yocto-docs rev: 38edc25b04c1a6d673ceb25f5548898d5b63b120) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 188cd74935d..21c1e423885 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -9999,6 +9999,31 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" PREFERRED_VERSION_python = "3.4.0" PREFERRED_VERSION_linux-yocto = "3.19%" + + The specified version is matched against + PV, + which does not necessarily match the version part of + the recipe's filename. + For example, consider two recipes + foo_1.2.bb and + foo_git.bb where + foo_git.bb contains the following + assignment: + + PV = "1.1+git${SRCPV}" + + In this case, the correct way to select + foo_git.bb is by using an + assignment such as the following: + + PREFERRED_VERSION_foo = "1.1+git%" + + Compare that previous example against the following + incorrect example, which does not work: + + PREFERRED_VERSION_foo = "git" + + Sometimes the PREFERRED_VERSION variable can be set by configuration files in a way that is hard to change.