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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content