[Yum] variables in conf file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Changes:
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: 
[base]
name=Red Hat Linux $releasever base - $basearch 
baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/

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

[base]
name=Red Hat Linux 7.3 base - i386
baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/7.3/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.

-sv




[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux