How to trace a variable setting with bitbake-getvar

From KoanSoftware Wiki
Jump to: navigation, search

How to trace a variable setting with bitbake-getvar

Sometime you may need to understand how bitbake is setting the value of a specific variable

$ bitbake-getvar IMAGE_FSTYPES

NOTE: Starting bitbake server...
#
# $IMAGE_FSTYPES [3 operations]
#   append /home/tux/yocto/poky/meta/conf/machine/include/qemu.inc:16
#     "tar.bz2 ext4"
#   set /home/tux/yocto/poky/meta/conf/documentation.conf:213
#     [doc] "Formats of root filesystem images that you want to have created."
#   set? /home/tux/yocto/poky/meta/conf/bitbake.conf:782
#     "tar.gz"
# pre-expansion value:
#   " tar.bz2 ext4"

IMAGE_FSTYPES=" tar.bz2 ext4"

You can use the bitbake-getvar command

usage: bitbake-getvar [-h] [-r RECIPE] [-u] [-f FLAG] [--value] variable

Bitbake Query Variable

positional arguments:
  variable              variable name to query

optional arguments:
  -h, --help            show this help message and exit
  -r RECIPE, --recipe RECIPE
                        Recipe name to query
  -u, --unexpand        Do not expand the value (with --value)
  -f FLAG, --flag FLAG  Specify a variable flag to query (with --value)
  --value               Only report the value, no history and no variable name