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
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2007-04-29 09:52:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 82, in main
    base.getOptionsConfig(args)
  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
    self.base.setupProgessCallbacks()
  File "/usr/share/yum-cli/output.py", line 322, in setupProgessCallbacks
    self.repos.setProgressBar(TextMeter(fo=sys.stdout))
  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
    self.plugins.run('postreposetup')
  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):
yum-3.1.7-1.fc7

How reproducible:
always
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.7-1.fc7.noarch
yum-updatesd-3.1.7-1.fc7.noarch
yum-metadata-parser-1.1.0-1.fc7.x86_64
yum-utils-1.1.2-1.fc7.noarch
yum-fastestmirror-1.1.2-1.fc7.noarch
yum-skip-broken-1.1.2-1.fc7.noarch

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 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
    repo.setupGrab()
  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
Comment 4 Seth Vidal 2007-04-29 09:52:38 EDT
apply this patch to yum and the plugins work again:
https://lists.dulug.duke.edu/pipermail/yum-cvs-commits/2007-April/001690.html

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

thanks
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.