Description of problem:
After the latest update, and if in /etc/yum.conf there is 'plugins=1'
an attempt to use yum ends with the following:
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
File "/usr/share/yum-cli/yummain.py", line 82, in main
File "/usr/share/yum-cli/cli.py", line 159, in getOptionsConfig
(opts, self.cmds) = self.optparser.setupYumConfig()
File "/usr/share/yum-cli/cli.py", line 1134, in setupYumConfig
File "/usr/share/yum-cli/output.py", line 322, in setupProgessCallbacks
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 497, in <lambda>
repos = property(fget=lambda self: self._getRepos(),
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 348, in _getRepos
File "/usr/lib/python2.5/site-packages/yum/plugins.py", line 163, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 83, in postreposetup_hook
repo.urls = repomirrors[str(repo)]
AttributeError: can't set attribute
With 'plugins=0' yum appears to work - with obvious limitations.
Version-Release number of selected component (if applicable):
what ver of yum-utils and what plugins do you have installed?
This is the whole current list:
yum-3.1.6-3.fc7 does not have any problems with AttributeError.
The problem is yum-fastestmirrors.py. Apparently there are some yum API changes
which require changes to the plugin:
- line 83: repo.urls is readonly attribute
solution: set repo._urls (is this the correct approach???)
- line 86: repo.setupGrab() is deprecated:
File "/usr/lib/yum-plugins/fastestmirror.py", line 86, in postreposetup_hook
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 364, in setupGrab
warnings.warn('setupGrab() will go away in a future version of Yum.\n',
NameError: global name 'warnings' is not defined
I think yumRepos.py forgets to import warnings module?
I commented out line 86 for now
With two changes the latest yum works again for me
apply this patch to yum and the plugins work again:
it's been applied to cvs so closing this upstream.
And going to build yum-3.1.7-2 for this in rawhide