Yum: How can I view variables like $releasever, $basearch & $YUM0?
120
votes
8
answers
213067
views
I am setting up a yum repository, and need to debug some of the URLs in the yum.conf file. I need to know why is Scientific Linux trying to grab this URL, when I was expecting it to grab another URL:
# yum install package
http://192.168.1.100/pub/scientific/6.1/x86_64/repodata/repomd.xml : [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: sl. Please verify its path and try again
The yum.conf(5) manpage gives some information about these variables:
> Variables
>
> There are a number of variables you can use to ease maintenance of
> yum's configuration files. They are available in the values of several
> options including name, baseurl and commands.
>
> $releasever This will be replaced with the value of the version of the
> package listed in distroverpkg. This defaults to the version of
> 'redhat-release' package.
>
> $arch This will be replaced with your
> architecture as listed by os.uname() in Python.
>
> $basearch This will be replaced with your base architecture in yum.
> For example, if your $arch is i686 your $basearch will be i386.
>
> $YUM0-$YUM9 These will be replaced with the value of the shell
> environment variable of the same name. If the shell environment
> variable does not exist then the configuration file variable will not
> be replaced.
Is there a way to view these variables by using the
yum
commandline utility? I would prefer to not hunt down the version of the 'redhat-release' package, or manually get the value of os.uname() in Python.
Asked by Stefan Lasiewski
(20733 rep)
Aug 29, 2011, 07:36 PM
Last activity: Dec 5, 2024, 09:18 PM
Last activity: Dec 5, 2024, 09:18 PM