I'm trying to install the latest EPEL automatically with the following repo --- [epel] name=Setup EPEL mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-$releasever&arch=$basearch --- After than I can then "yum install epel-release" to know I'm getting the latest version The issue is that on RHEL "$releasever" expands to "6Server", which is an invalid path --- $ urlgrabber 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6Server&arch=x86_64' $ head -2 mirrorlist # repo = epel-6Server arch = x86_64 error: invalid repo or arch # following repositories are available: --- As far as I can tell, there is no variable for yum that provides just the major version. I think the solution is to have the mirrorlist recognise 6Server (and 7Server) and just point them at epel-X (ps I know this isn't really a problem with this package, but I'm unsure what category would find whoever owns mirrors.fedoraproject.org)
Right, this is not really a bug in this package. ;) Can you file this upstream with mirrormanager? https://fedorahosted.org/mirrormanager/ Also, in the mean time from 'man yum.conf': " $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. As of 3.2.28, any file in /etc/yum/vars is turned into a variable named after the filename (or overrides any of the above variables)." So, you could add a var in $YUM0 or /etc/yum/vars/whatever and use that in your file? You could even override releasever (although I am unsure if that will break your rhel/centos/sl/whatever repos.