SCIENTIFIC-LINUX-DEVEL Archives

April 2008

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Tue, 8 Apr 2008 07:08:38 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (75 lines)
Well I've been testing some upgrades in preparation for moving our default 
setup from sl50 to sl51, and (re-)discovered a minor problem...

$ yum --changelog update
Loading "skip-broken" plugin
Loading "installonlyn" plugin
Loading "downloadonly" plugin
Loading "protectbase" plugin
Loading "fastestmirror" plugin
Loading "priorities" plugin
Loading "changelog" plugin
Loading "tsflags" plugin
Loading "kernel-module" plugin
Loading "cms-reboot-update-schedule" plugin
Setting up Update Process
Setting up repositories
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
   File "/usr/bin/yum", line 29, in ?
     yummain.main(sys.argv[1:])
   File "/usr/share/yum-cli/yummain.py", line 94, in main
     result, resultmsgs = base.doCommands()
   File "/usr/share/yum-cli/cli.py", line 381, in doCommands
     return self.yum_cli_commands[self.basecmd].doCommand(self, 
self.basecmd, self.extcmds)
   File "/usr/share/yum-cli/yumcommands.py", line 150, in doCommand
     return base.updatePkgs(extcmds)
   File "/usr/share/yum-cli/cli.py", line 673, in updatePkgs
     self.doRepoSetup()
   File "/usr/share/yum-cli/cli.py", line 104, in doRepoSetup
     yum.YumBase.doRepoSetup(self, thisrepo=thisrepo)
   File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 313, in 
doRepoSetup
     self.plugins.run('postreposetup')
   File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 153, in run
     func(conduitcls(self, self.base, conf, **kwargs))
   File "/usr/lib/yum-plugins/changelog.py", line 80, in postreposetup_hook
     repos.populateSack(mdtype='otherdata')
TypeError: populateSack() got an unexpected keyword argument 'mdtype'
$ yum --version
3.0.6

On an sl50 machine /usr/lib/yum-plugins/changelog.py at the same place has 
with='othertype' ie the diff contains:

@@ -75,7 +77,7 @@

      if changelog:
          repos = conduit.getRepos()
-        repos.populateSack(with='otherdata')
+        repos.populateSack(mdtype='otherdata')

  def postresolve_hook(conduit):

A quick google search shows that Centos has the same problem:

   http://bugs.centos.org/view.php?id=2594

and they suggest either a patch to yum-utils (go back to using with=) or 
yum (support mdtype=).

I don't know if one fix is particularly better than the other (altering 
yum may then break anything else using populateSack(with=...), but if that 
is what newer versions of yum provide then it is probably best to break 
things sooner rather than later...)

   locate '*.py'| xargs egrep -i 'populateSack.*with'

shows only bits inside yum itself and changelog.py (was this an interface 
that wasn't supposed to be exposed?)

-- 
Jon Peatfield,  Computer Officer,  DAMTP,  University of Cambridge
Mail:  [log in to unmask]     Web:  http://www.damtp.cam.ac.uk/

ATOM RSS1 RSS2