This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 238276 - yum update breaks use of plugins
yum update breaks use of plugins
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
  Show dependency treegraph
Reported: 2007-04-28 13:55 EDT by Michal Jaegermann
Modified: 2014-01-21 17:57 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-29 09:52:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2007-04-28 13:55:28 EDT
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/", line 82, in main
  File "/usr/share/yum-cli/", line 159, in getOptionsConfig
    (opts, self.cmds) = self.optparser.setupYumConfig()
  File "/usr/share/yum-cli/", line 1134, in setupYumConfig
  File "/usr/share/yum-cli/", line 322, in setupProgessCallbacks
  File "/usr/lib/python2.5/site-packages/yum/", line 497, in <lambda>
   repos = property(fget=lambda self: self._getRepos(),
  File "/usr/lib/python2.5/site-packages/yum/", line 348, in _getRepos'postreposetup')
  File "/usr/lib/python2.5/site-packages/yum/", line 163, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/", 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):

How reproducible:
Comment 1 Seth Vidal 2007-04-28 14:02:30 EDT
what ver of yum-utils and what plugins do you have installed?
Comment 2 Michal Jaegermann 2007-04-28 14:14:23 EDT
This is the whole current list:


yum-3.1.6-3.fc7 does not have any problems with AttributeError.
Comment 3 Stefan Becker 2007-04-29 04:56:05 EDT
The problem is 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/", line 86, in postreposetup_hook
  File "/usr/lib/python2.5/site-packages/yum/", 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 forgets to import warnings module?
   I commented out line 86 for now

With two changes the latest yum works again for me
Comment 4 Seth Vidal 2007-04-29 09:52:38 EDT
apply this patch to yum and the plugins work again:

it's been applied to cvs so closing this upstream.

Comment 5 Jeremy Katz 2007-04-30 14:42:35 EDT
And going to build yum-3.1.7-2 for this in rawhide

Note You need to log in before you can comment on or make changes to this bug.