Yum repository file does not support an underscore after $releasever or $basearch variables

Solution In Progress - Updated -

Issue

  • When using a name like myrepo_$releasever_$basearch in either name or baseurl entries of a repository file, it does not replace $releasever with the
    version number and $basearch with the architecture :-
# cat /etc/yum.repos.d/myrepo.repo 
[myrepo]
name=myrepo_$releasever_$basearch_Repo
baseurl=file:///mnt
enabled=1
gpgcheck=0


# yum repolist 
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, verify
repo id                  repo name                        status
myrepo             myrepo_$releasever_$basearch_Repo         0

Environment

  • yum
  • Red Hat Enterprise Linux (RHEL)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.