[Yum-devel] Plugin getPackages() traceback on remove operation

Panu Matilainen pmatilai at laiskiainen.org
Thu Jun 16 14:31:15 UTC 2005


[root at lizilla ~]# yum remove telnet
Loading "cfagent" plugin
Loading "kernel-module" plugin
Setting up Remove Process
Resolving Dependencies
Traceback (most recent call last):
   File "/usr/bin/yum", line 15, in ?
     yummain.main(sys.argv[1:])
   File "/usr/share/yum-cli/yummain.py", line 133, in main
     (result, resultmsgs) = base.buildTransaction()
   File "__init__.py", line 337, in buildTransaction
   File "plugins.py", line 167, in run
   File "/usr/lib/yum-plugins/kernel-module.py", line 31, in 
preresolve_hook
     pkgs = conduit.getPackages()
   File "plugins.py", line 454, in getPackages
AttributeError: YumBaseCli instance has no attribute 'pkgSack'

The reason is obvious of course, "remove" doesn't set up pkgSack at all. 
Question is, what should we do about it:
- populate pkgSack on removals as well (could there be good reasons for
   wanting this otherwise?)
- trap the exception in getPackages() and return empty list to plugins
- leave plugins to deal with it by themselves
- something else?

 	- Panu -




More information about the Yum-devel mailing list