Description of problem: Error in yumex. Version-Release number of selected component (if applicable): yumex-3.0.6-1.fc17.noarch How reproducible: always Steps to Reproduce: 1. start yumex 2. 3. Actual results: 10:43:25 : network interface em1 (r8169) is connected 10:43:25 : Connected to an network 10:43:25 : network interface em1 (r8169) is connected 10:43:25 : Starting yum child process 10:43:31 : YUM: Yum Version : 3.4.3 10:43:31 : YUM: Loaded plugins: langpacks, presto 10:43:31 : YUM: Traceback (most recent call last): 10:43:31 : YUM: File "/usr/share/yumex/yum_childtask.py", line 66, in <module> 10:43:31 : YUM: my = YumServer(debuglevel, plugins, offline, repos, yum_conf) 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yumexbackend/yum_server.py", line 188, in __init__ 10:43:31 : YUM: self.doLock() 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yumexbackend/yum_server.py", line 261, in doLock 10:43:31 : YUM: yum.YumBase.doLock(self) 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1963, in doLock 10:43:31 : YUM: if self.conf.uid != 0: 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1017, in <lambda> 10:43:31 : YUM: conf = property(fget=lambda self: self._getConfig(), 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 372, in _getConfig 10:43:31 : YUM: startupconf.pluginconfpath,disabled_plugins,enabled_plugins) 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 619, in doPluginSetup 10:43:31 : YUM: plugin_types, confpath, disabled_plugins, enabled_plugins) 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 165, in __init__ 10:43:31 : YUM: self.run('config') 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 187, in run 10:43:31 : YUM: func(conduitcls(self, self.base, conf, **kwargs)) 10:43:31 : YUM: File "/usr/lib/yum-plugins/langpacks.py", line 133, in config_hook 10:43:31 : YUM: conduit.registerCommand(LanginstallCommand()) 10:43:31 : YUM: File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 553, in registerCommand 10:43:31 : YUM: raise Errors.ConfigError(_('registration of commands not supported')) 10:43:31 : YUM: yum.Errors.ConfigError: registration of commands not supported Expected results: no error Additional info:
Does yum command lines work ? It looks like a problem in yum-langpacks. what version of yum-langpacks is installed ? Try running 'yumex --noplugins'
Ok, this is caused by yum-langpacks-0.3.0-1 from updates-testing a TYPE_CORE plugin should not use registerCommand to register extra command line commands, only TYPE_INTERACTIVE should do that. At least it should catch these kind of exception and not blowup.
Coment #1 >Does yum command lines work ? yes >what version of yum-langpacks is installed ? yum-langpacks-0.3.0-1.fc17.noarch >Try running 'yumex --noplugins' Yes. It works.
registerCommand is a member of cli.YumBaseCli (the yum cli main class), but don't exist in yum.YumBase (the yum api main class), so the plugin will blow up if any api users there has enabled plugins. solutions: 1. change plugin type to TYPE_INTERACTIVE (most api users only uses TYPE_CORE plugins) 2. check if registerCommand exists ( if hasattr(self._base,'registerCommand'): ) 3. catch the exception raises by the plugin conduit.
*** Bug 847555 has been marked as a duplicate of this bug. ***
1. Done. 2/3. - changed to check for registerCommand. Only one plugin in yum-utils does this from a brief check.
yum-langpacks-0.3.0-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/yum-langpacks-0.3.0-2.fc17
Created attachment 604144 [details] Plugins types using registerCommand
The updated fixes the issue. Checked plugins in yum-utils, all plugin there uses registerCommand is TYPE_INTERACTIVE except versionlock and it has the check for registerCommand is available, so all is safe there. (See attachment) Thanks !!
yum-langpacks-0.3.0-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
Thanks for the note - given that, I think TYPE_CORE w/checks is more appropriate for yum-langpacks than TYPE_INTERACTIVE.
(In reply to comment #11) > Thanks for the note - given that, I think TYPE_CORE w/checks is more > appropriate for yum-langpacks than TYPE_INTERACTIVE. I agree to that too, yum-langpacks does some actions typical for a TYPE_CORE plugin with some addon commands there is more typical TYPE_INTERACTIVE