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()[4] 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()[4] in Python.
cat /etc/redhat-release
Actually, usecat /etc/system-release
instead, since this will be a symlink to /etc/redhat-release, /etc/centos-release, /etc/oel-release, /etc/<whatever scientific Linux uses>, as appropriate./etc/redhat-release
is not the same thing as the$releasever
variable. The question here is to figure out what is Yum substituting in place of these variables? What's happening programmatically?rpm -qf /etc/issue
is the canonical method, and would have been the method in LSB except SuSE didn't budge in the FSStnd meetings. YARLY.