Yocto Tutorial - 07 Variable Assignment Operators (Part-1) | Types of Variable Assignment Operators

Опубликовано: 04 Ноябрь 2024
на канале: Tech-A-Byte
4,216
41

In this video, we will learn about the different types of variable assignments in Yocto.

Variables are an important concept in Yocto and are used to define various properties and settings in the system. In this video, we will cover the following types of variable assignments:

"?=": This is used to assign a default value to a variable, which can be overridden later.
"??=": This is also used to assign a default value to a variable, but it is a weak assignment and can be overridden. If multiple assignments are done with this type, the last one will be considered.
"=": This is a simple variable assignment that requires quotes and spaces, but variables are expanded at the end.
":=": This is an immediate variable expansion, meaning the assigned value is expanded immediately.
"+=": This appends a value to a variable, with a space inserted between the current value and appended value. It takes effect immediately.
"=+": This prepends a value to a variable, with a space inserted between the current value and prepended value. It takes effect immediately.
".=": This appends a value to a variable, with no space inserted between the current value and appended value. It takes effect immediately.
"=.": This prepends a value to a variable, with no space inserted between the current value and prepended value. It takes effect immediately.
":append": This appends a value to a variable, with no space inserted between the current value and appended value. The effects are applied at variable expansion time rather than being immediately applied.
":prepend": This prepends a value to a variable, with no space inserted between the current value and prepended value. The effects are applied at variable expansion time rather than being immediately applied.
":remove": This removes values from lists. Specifying a value for removal causes all occurrences of that value to be removed from the variable.

Github: https://github.com/Munawar-git/YoctoT...