reposycn rhel5 repos from redhat7.3 result with error.

Latest response

im trying to reposync redhat5 repos from a new deployed system of redhat 7.3 and its result with the below error.
on my redhat 6 its works.
what could be the problem?

yum repolist

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Traceback (most recent call last):
File "/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 370, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 179, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 573, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 2153, in doCommand
base.repos.populateSack()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 380, in populateSack
sack._retrieve_async(repo, data)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 187, in _retrieve_async
repo._retrieveMD(mydbtype, async=True, failfunc=None)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1851, in _retrieveMD
text = "%s/%s" % (self.ui_id, mdtype)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 437, in _ui_id
ret += str(self.yumvar[var])
KeyError: 'basearc'

Responses

found the problem: it seems that when used on different dist version the combination of those 2 variables does not goes well you need not to use variables in the repo file

baseurl = https://cdn.redhat.com/content/dist/rhel/server/5/5Server/$basearch/os ui_repoid_vars = releasever basearc

so ive deleted the the line where 'ui_repoid_vars = releasever basearc' and set 'baseurl' as followed:

https://cdn.redhat.com/content/dist/rhel/server/5/5Server/x86_64/os

That's the only way I know how to do it as well. Seems to work though. Good reminder.

Close

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