summaryrefslogtreecommitdiffstats
path: root/documentation/poky-ref-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-09-25 07:43:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-28 17:54:26 +0100
commitaf8a6a291268d1dd1bd235d66969907d7f7af74e (patch)
tree15d852c4ac5b538069860e82a292b40c5fb98e2f /documentation/poky-ref-manual
parent8711ca817a4cf1c30dfdcd7717676b8d7979f0c2 (diff)
downloadpoky-af8a6a291268d1dd1bd235d66969907d7f7af74e.tar.gz
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 <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/poky-ref-manual')
-rw-r--r--documentation/poky-ref-manual/ref-variables.xml71
1 files changed, 57 insertions, 14 deletions
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}", \
963 963
964 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm> 964 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
965 <glossdef> 965 <glossdef>
966 <para>Defines the Package revision. 966 <para>Helps define the recipe revision for recipes that share
967 You manually combine values for <filename>INC_PR</filename> into the 967 a common <filename>include</filename> file.
968 <link linkend='var-PR'><filename>PR</filename></link> field of the parent recipe. 968 You can think of this variable as part of the recipe revision
969 When you change this variable, you change the <filename>PR</filename> 969 as set from within an include file.</para>
970 value for every person that includes the file.</para> 970 <para>Suppose, for example, you have a set of recipes that
971 <para> 971 are used across several projects.
972 The following example shows how to use the <filename>INC_PR</filename> variable 972 And, within each of those recipes the revision
973 given a common <filename>.inc</filename> file that defines the variable. 973 (its <filename>PR</filename> value) is set accordingly.
974 Once defined, you can use the variable to set the 974 In this case, when the revision of those recipes changes
975 <filename>PR</filename> value: 975 the burden is on you to find all those recipes and
976 </para> 976 be sure that they get changed to reflect the updated
977 <literallayout class='monospaced'> 977 version of the recipe.
978 In this scenario, it can get complicated when recipes
979 used in many places and that provide common functionality
980 are upgraded to a new revision.</para>
981 <para>A more efficient way of dealing with this situation is
982 to set the <filename>INC_PR</filename> variable inside
983 the <filename>include</filename> files that the recipes
984 share and then expand the <filename>INC_PR</filename>
985 variable within the recipes to help
986 define the recipe revision.
987 </para>
988 <para>
989 The following provides an example that shows how to use
990 the <filename>INC_PR</filename> variable
991 given a common <filename>include</filename> file that
992 defines the variable.
993 Once the variable is defined in the
994 <filename>include</filename> file, you can use the
995 variable to set the <filename>PR</filename> values in
996 each recipe.
997 You will notice that when you set a recipe's
998 <filename>PR</filename> you can provide more granular
999 revisioning by appending values to the
1000 <filename>INC_PR</filename> variable:
1001 <literallayout class='monospaced'>
1002recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
978recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1" 1003recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
979recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0" 1004recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
980recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" 1005recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
981recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2" 1006 </literallayout>
982 </literallayout> 1007 The first line of the example establishes the baseline
1008 revision to be used for all recipes that use the
1009 <filename>include</filename> file.
1010 The remaining lines in the example are from individual
1011 recipes and show how the <filename>PR</filename> value
1012 is set.</para>
1013 <para>You will notice that each statement setting the
1014 <filename>PR</filename> appends further definition of the
1015 revision (e.g. <filename>.1</filename>, <filename>.0</filename>,
1016 and <filename>.3</filename>).
1017 It is still up to you be sure that the exact revision
1018 of the recipe is being used.
1019 So, for example, if the <filename>encodings_1.0.4.bb</filename>
1020 recipe was updated to a <filename>.5</filename> revision,
1021 you would have to change the <filename>PR</filename>
1022 variable in the recipe as follows:
1023 <literallayout class='monospaced'>
1024recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.5"
1025 </literallayout></para>
983 </glossdef> 1026 </glossdef>
984 </glossentry> 1027 </glossentry>
985 1028