Sometimes the name of a recipe can lead to versioning
problems when the recipe is upgraded to a final release.
For example, consider the
irssi_0.8.16-rc1.bb
recipe file in
the list of example recipes in the
"Storing and Naming the Recipe"
section.
This recipe is at a release candidate stage (i.e.
"rc1").
When the recipe is released, the recipe filename becomes
irssi_0.8.16.bb
.
The version change from 0.8.16-rc1
to 0.8.16
is seen as a decrease by the
build system and package managers, so the resulting packages
will not correctly trigger an upgrade.
In order to ensure the versions compare properly, the
recommended convention is to set
PV
within the recipe to
"<previous version>+<current version>".
You can use an additional variable so that you can use the
current version elsewhere.
Here is an example:
REALPV = "0.8.16-rc1" PV = "0.8.15+${REALPV}"