Product SiteDocumentation Site

4.2. YUM Variables

Several YUM variables are available for use in the configuration files of the YUM system. They can be used with various configuration options, such as: name, baseurl as well as with the commands.
$releasever
It will be replaced with the value of the version of the package specified by distroverpkg. The default is the version of redhat-release package. In Fedora it is fedora-release.
$arch
It is replaced with the architecture of your system and according to os.uname() in Python.
$basearch
Is replaced by the base architecture in YUM. For example, if your $arch is i686, $basearch would be i386.
$uuid
Will be replaced by a unique, persistent uuid for this machine. The generated value will be stored in /var/lib/yum/uuid and will be reused until this file is deleted.
$YUM0-$YUM9
These variables will be replaced with the value of the shell variable of the same name. If the shell environment variable does not exist, then the variable in the configuration file will not be replaced.
Since yum version 3.2.28 every file in /etc/yum/vars becomes a variable with the same name as the file name and overwrite any of the variables previously described above.
Make sure the file in /etc/yum/vars are readable because there will be no warnings or errors otherwise. From the files it will only be read the first line and he new line character will be ignored. Note that there is no check for the existence of strange characters.