summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@cherry.de>2025-10-29 18:42:42 +0100
committerSteve Sakoman <steve@sakoman.com>2025-11-19 08:21:24 -0800
commit41c16e82e98a3e41e852b10044b738ff4869bfd0 (patch)
tree16b6c183d919108930dd9b18fcddee6c6da56911 /documentation/dev-manual
parentcab0ee97d8ba92d77a0b6046ac3d8aaec182fdcd (diff)
downloadpoky-41c16e82e98a3e41e852b10044b738ff4869bfd0.tar.gz
dev-manual: debugging: use bitbake-getvar in Viewing Variable Values section
We should recommend using bitbake-getvar command wherever possible as its output is much less confusing and overwhelming than bitbake -e. Unfortunately, bitbake-getvar currently doesn't list Python tasks or functions, unlike bitbake -e, so keep the latter for some corner cases. [AG: Moroever -> Moreover typo fix] (From yocto-docs rev: 382c8eee275eb4773d4e2183f5fe19837a6a3b0b) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit 41e4e05369c4e028c679749b7b62434327927a09) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/debugging.rst34
1 files changed, 20 insertions, 14 deletions
diff --git a/documentation/dev-manual/debugging.rst b/documentation/dev-manual/debugging.rst
index 5a3fb11170..b81eda07ff 100644
--- a/documentation/dev-manual/debugging.rst
+++ b/documentation/dev-manual/debugging.rst
@@ -111,17 +111,17 @@ occurred in your project. Perhaps an attempt to :ref:`modify a variable
111<bitbake-user-manual/bitbake-user-manual-metadata:modifying existing 111<bitbake-user-manual/bitbake-user-manual-metadata:modifying existing
112variables>` did not work out as expected. 112variables>` did not work out as expected.
113 113
114BitBake's ``-e`` option is used to display variable values after 114BitBake's ``bitbake-getvar`` command is used to display variable values after
115parsing. The following command displays the variable values after the 115parsing. The following command displays the variable value for :term:`OVERRIDES`
116configuration files (i.e. ``local.conf``, ``bblayers.conf``, 116after the configuration files (i.e. ``local.conf``, ``bblayers.conf``,
117``bitbake.conf`` and so forth) have been parsed:: 117``bitbake.conf`` and so forth) have been parsed::
118 118
119 $ bitbake -e 119 $ bitbake-getvar OVERRIDES
120 120
121The following command displays variable values after a specific recipe has 121The following command displays the value of :term:`PV` after a specific recipe
122been parsed. The variables include those from the configuration as well:: 122has been parsed::
123 123
124 $ bitbake -e recipename 124 $ bitbake-getvar -r recipename PV
125 125
126.. note:: 126.. note::
127 127
@@ -135,19 +135,25 @@ been parsed. The variables include those from the configuration as well::
135 the recipe datastore, which means that variables set within one task 135 the recipe datastore, which means that variables set within one task
136 will not be visible to other tasks. 136 will not be visible to other tasks.
137 137
138In the output of ``bitbake -e``, each variable is preceded by a 138In the output of ``bitbake-getvar``, the line containing the value of the
139description of how the variable got its value, including temporary 139variable is preceded by a description of how the variable got its value,
140values that were later overridden. This description also includes 140including temporary values that were later overridden. This description also
141variable flags (varflags) set on the variable. The output can be very 141includes variable flags (varflags) set on the variable. The output can be very
142helpful during debugging. 142helpful during debugging.
143 143
144Variables that are exported to the environment are preceded by 144Variables that are exported to the environment are preceded by
145``export`` in the output of ``bitbake -e``. See the following example:: 145``export`` in the output of ``bitbake-getvar``. See the following example::
146 146
147 export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86" 147 export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86"
148 148
149In addition to variable values, the output of the ``bitbake -e`` and 149Shell functions and tasks can also be inspected with the same mechanism::
150``bitbake -e`` recipe commands includes the following information: 150
151 $ bitbake-getvar -r recipename do_install
152
153For Python functions and tasks, ``bitbake -e recipename`` can be used instead.
154
155Moreover, the output of the ``bitbake -e`` and ``bitbake -e`` recipe commands
156includes the following information:
151 157
152- The output starts with a tree listing all configuration files and 158- The output starts with a tree listing all configuration files and
153 classes included globally, recursively listing the files they include 159 classes included globally, recursively listing the files they include