From af8a6a291268d1dd1bd235d66969907d7f7af74e Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 25 Sep 2012 07:43:34 -0700 Subject: documentation: INC_PR glossary definition changes A re-write of this glossary item. The example provides more detail and frames it in the context of a real example. (From yocto-docs rev: 1a88abecf6ab5895d3c8ff801bd869a90a8a3fc1) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/poky-ref-manual/ref-variables.xml | 71 ++++++++++++++++++++----- 1 file changed, 57 insertions(+), 14 deletions(-) (limited to 'documentation/poky-ref-manual/ref-variables.xml') diff --git a/documentation/poky-ref-manual/ref-variables.xml b/documentation/poky-ref-manual/ref-variables.xml index 150d15c433..21197806c2 100644 --- a/documentation/poky-ref-manual/ref-variables.xml +++ b/documentation/poky-ref-manual/ref-variables.xml @@ -963,23 +963,66 @@ FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", \ INC_PR - Defines the Package revision. - You manually combine values for INC_PR into the - PR field of the parent recipe. - When you change this variable, you change the PR - value for every person that includes the file. - - The following example shows how to use the INC_PR variable - given a common .inc file that defines the variable. - Once defined, you can use the variable to set the - PR value: - - + Helps define the recipe revision for recipes that share + a common include file. + You can think of this variable as part of the recipe revision + as set from within an include file. + Suppose, for example, you have a set of recipes that + are used across several projects. + And, within each of those recipes the revision + (its PR value) is set accordingly. + In this case, when the revision of those recipes changes + the burden is on you to find all those recipes and + be sure that they get changed to reflect the updated + version of the recipe. + In this scenario, it can get complicated when recipes + used in many places and that provide common functionality + are upgraded to a new revision. + A more efficient way of dealing with this situation is + to set the INC_PR variable inside + the include files that the recipes + share and then expand the INC_PR + variable within the recipes to help + define the recipe revision. + + + The following provides an example that shows how to use + the INC_PR variable + given a common include file that + defines the variable. + Once the variable is defined in the + include file, you can use the + variable to set the PR values in + each recipe. + You will notice that when you set a recipe's + PR you can provide more granular + revisioning by appending values to the + INC_PR variable: + +recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" -recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" - + + The first line of the example establishes the baseline + revision to be used for all recipes that use the + include file. + The remaining lines in the example are from individual + recipes and show how the PR value + is set. + You will notice that each statement setting the + PR appends further definition of the + revision (e.g. .1, .0, + and .3). + It is still up to you be sure that the exact revision + of the recipe is being used. + So, for example, if the encodings_1.0.4.bb + recipe was updated to a .5 revision, + you would have to change the PR + variable in the recipe as follows: + +recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.5" + -- cgit v1.2.3-54-g00ecf