Download OpenEmbedded User Manual
Transcript
Chapter 8. Recipes
to specify release number 1 (the second release, the first would have been 0). If there is no definition of
PR in the recipe then the default value of "r0" is used.
Note: It is good practice to always define PR in your recipes, even for the "r0" release, so that when
editing the recipe it is clear that the PR number needs to be updated.
You should always increment PR when modifying a recipe. Sometimes this can be avoided if the
change will have no effect on the actual packages generated by the recipe, such as updating the
SRC_URI to point to a new host. If in any doubt then you should increase the PR regardless of what
has been changed.
The PR value should never be decremented. If you accidentally submit a large PR value for example
then it should be left at the value and just increased for new releases, not reset back to a lower
version.
When a recipe is being processed some variables are automatically set based on the recipe file name and
can be used for other purposes from within the recipe itself. These include:
PN
The package name. Determined from the recipe filename - everything up until the first underscore is
considered to be the package name. For the strace_4.5.14.bb recipe the PN variable would be set to
"strace".
PV
The package version. Determined from the recipe filename - everything between the first underscore
and the final .bb is considered to be the package version. For the strace_4.5.14.bb recipe the PV
variable would be set to "4.5.14".
PR
The package release. This is explicitly set in the recipe, or if not set it defaults to "r0" if not set.
P
The package name and versions separated by a hyphen.
P = "${PN}-${PV}"
For the strace_4.5.14.bb recipe the P variable would be set to "strace-4.5.14".
PF
The package name, version and release separated by hyphens.
PF = "${PN}-${PV}-${PR}"
46