diff options
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r-- | documentation/ref-manual/variables.rst | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 4ac61af364..cf9b960b18 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -209,12 +209,11 @@ system and gives an overview of their function and contents. | |||
209 | SRCREV = "${AUTOREV}" | 209 | SRCREV = "${AUTOREV}" |
210 | 210 | ||
211 | If you use the previous statement to retrieve the latest version of | 211 | If you use the previous statement to retrieve the latest version of |
212 | software, you need to be sure :term:`PV` contains | 212 | software, you need to make sure :term:`PV` contains the ``+`` sign so |
213 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel | 213 | :term:`bitbake` includes source control information to :term:`PKGV` when |
214 | recipe that inherits the :ref:`ref-classes-kernel` class and you | 214 | packaging the recipe. For example:: |
215 | use the previous statement. In this example, ``${SRCPV}`` does not | 215 | |
216 | automatically get into :term:`PV`. Consequently, you need to change | 216 | PV = "6.10.y+git" |
217 | :term:`PV` in your recipe so that it does contain ``${SRCPV}``. | ||
218 | 217 | ||
219 | For more information see the | 218 | For more information see the |
220 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" | 219 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" |
@@ -5152,7 +5151,7 @@ system and gives an overview of their function and contents. | |||
5152 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` | 5151 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
5153 | for the recipe:: | 5152 | for the recipe:: |
5154 | 5153 | ||
5155 | PV = "${LINUX_VERSION}+git${SRCPV}" | 5154 | PV = "${LINUX_VERSION}+git" |
5156 | 5155 | ||
5157 | :term:`LINUX_VERSION_EXTENSION` | 5156 | :term:`LINUX_VERSION_EXTENSION` |
5158 | A string extension compiled into the version string of the Linux | 5157 | A string extension compiled into the version string of the Linux |
@@ -6715,22 +6714,14 @@ system and gives an overview of their function and contents. | |||
6715 | string. You cannot use the wildcard character in any other | 6714 | string. You cannot use the wildcard character in any other |
6716 | location of the string. | 6715 | location of the string. |
6717 | 6716 | ||
6718 | The specified version is matched against :term:`PV`, which | 6717 | The specified version is matched against :term:`PV`, which does not |
6719 | does not necessarily match the version part of the recipe's filename. | 6718 | necessarily match the version part of the recipe's filename. |
6720 | For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` | ||
6721 | where ``foo_git.bb`` contains the following assignment:: | ||
6722 | |||
6723 | PV = "1.1+git${SRCPV}" | ||
6724 | |||
6725 | In this case, the correct way to select | ||
6726 | ``foo_git.bb`` is by using an assignment such as the following:: | ||
6727 | |||
6728 | PREFERRED_VERSION_foo = "1.1+git%" | ||
6729 | 6719 | ||
6730 | Compare that previous example | 6720 | If you want to select a recipe named ``foo_git.bb`` which has :term:`PV` |
6731 | against the following incorrect example, which does not work:: | 6721 | set to ``1.2.3+git``, you can do so by setting ```PREFERRED_VERSION_foo`` |
6732 | 6722 | to ``1.2.3%`` (i.e. simply setting ``PREFERRED_VERSION_foo`` to ``git`` | |
6733 | PREFERRED_VERSION_foo = "git" | 6723 | will not work as the name of the recipe isn't used, but rather its |
6724 | :term:`PV` definition). | ||
6734 | 6725 | ||
6735 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by | 6726 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
6736 | configuration files in a way that is hard to change. You can use | 6727 | configuration files in a way that is hard to change. You can use |
@@ -8316,21 +8307,23 @@ system and gives an overview of their function and contents. | |||
8316 | (SCM). | 8307 | (SCM). |
8317 | 8308 | ||
8318 | :term:`SRCPV` | 8309 | :term:`SRCPV` |
8319 | Returns the version string of the current package. This string is | 8310 | The variable :term:`SRCPV` is deprecated. It was previously used to |
8320 | used to help define the value of :term:`PV`. | 8311 | include source control information in :term:`PV` for :term:`bitbake` to |
8312 | work correctly but this is no longer a requirement. Source control | ||
8313 | information will be automatically included by :term:`bitbake` in the | ||
8314 | variable :term:`PKGV` during packaging if the ``+`` sign is present in | ||
8315 | :term:`PV`. | ||
8321 | 8316 | ||
8322 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` | 8317 | .. note:: |
8323 | configuration file in the :term:`Source Directory` as | ||
8324 | follows:: | ||
8325 | 8318 | ||
8326 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" | 8319 | The :term:`SRCPV` variable used to be defined in the |
8320 | ``meta/conf/bitbake.conf`` configuration file in the :term:`Source | ||
8321 | Directory` as follows:: | ||
8327 | 8322 | ||
8328 | Recipes that need to define :term:`PV` do so with the help of the | 8323 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
8329 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) | ||
8330 | located in ``meta/recipes-connectivity`` in the Source Directory | ||
8331 | defines :term:`PV` as follows:: | ||
8332 | 8324 | ||
8333 | PV = "0.12-git${SRCPV}" | 8325 | The ``get_srcrev`` function can still be used to include source control |
8326 | information in variables manually. | ||
8334 | 8327 | ||
8335 | :term:`SRCREV` | 8328 | :term:`SRCREV` |
8336 | The revision of the source code used to build the package. This | 8329 | The revision of the source code used to build the package. This |