[Yum] variables in conf file

seth vidal skvidal at phy.duke.edu
Mon Mar 17 04:43:18 UTC 2003

Hi folks,
 Newest daily is here. (sorry for two today but - well, I was thinking
about it a lot.)

The config file now has variables.

You can do the following:

$basearch is replaced with the arch as returned by archwork.getArch()
- for example: if you're i686/i586/i486 it will return i386

$arch is replaced with your actual arch as returned by os.uname()[4]

$releasever is replaced with the result of the python equivalent of rpm
-q --qf %{version} somepkg

the pkg that is 'somepkg' is defined by the value of distroverpkg in
main - it defaults to redhat-release

so the below: 
name=Red Hat Linux $releasever base - $basearch 

on my 7.3 pentium 4 with distroverpkg not defined in [main] becomes.

name=Red Hat Linux 7.3 base - i386

Does that make sense to everyone? Hell, does that make sense to anyone?

The first person to write that into something bordering on sensible for
the man page will get a gold star.

thanks - let me know when it breaks.


More information about the Yum mailing list