From 55ab189a41a7c6863e1351c9c629ae6b2dc549f7 Mon Sep 17 00:00:00 2001 From: Antonin Godard Date: Tue, 25 Mar 2025 12:13:04 +0100 Subject: ref-manual/variables.rst: improve the PKGV documentation It may be confusing for users that source control information is not present in the BitBake environment. Document it as a warning block. (From yocto-docs rev: ba0a321e5c623a9c716be7a451fdd60fae5b26b4) Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- documentation/ref-manual/variables.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 1e6918da5a..c7348076b8 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -6829,6 +6829,23 @@ system and gives an overview of their function and contents. The version of the package(s) built by the recipe. By default, :term:`PKGV` is set to :term:`PV`. + If :term:`PV` contains the ``+`` sign, source control information will be + included in :term:`PKGV` later in the packaging phase. For more + information, see the :doc:`/dev-manual/external-scm` section of the Yocto + Project Development Tasks Manual. + + .. warning:: + + Since source control information is included in a late stage by the + :ref:`ref-classes-package` class, it cannot be seen from the BitBake + environment with ``bitbake -e`` or ``bitbake-getvar``. Instead, after + the package is built, the version information can be retrieved with + ``oe-pkgdata-util package-info ``. See the + :ref:`dev-manual/debugging:Viewing Package Information with + \`\`oe-pkgdata-util\`\`` section of the Yocto Project Development Tasks + Manual for more information on ``oe-pkgdata-util``. + + :term:`PN` This variable can have two separate functions depending on the context: a recipe name or a resulting package name. -- cgit v1.2.3-54-g00ecf