Red Hat Bugzilla – Bug 506764
KeyError: 'getpwuid(): uid not found on system using NIS
Last modified: 2014-01-21 18:10:14 EST
Description of problem:
Running 'yum verify' crashes with an error about some UID not being found.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. $ yum verify
$ yum verify
Loaded plugins: fastestmirror, presto, refresh-packagekit, security, verify
/usr/lib/python2.6/site-packages/yum/packages.py:1484: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
(ig, fp,er) = os.popen3([prelink_cmd, "-y", fn])
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 178, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 352, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/lib/yum-plugins/verify.py", line 355, in doCommand
self.show_data(base, msg, ypl.installed, 'Installed Packages')
File "/usr/lib/yum-plugins/verify.py", line 285, in show_data
for (pkg, results) in self.filter_data(msg, pkgs):
File "/usr/lib/yum-plugins/verify.py", line 206, in filter_data
oresults = pkg.verify(patterns=self._filename_globs, all=self.all)
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1389, in verify
my_user = pwd.getpwuid(my_st[stat.ST_UID])
KeyError: 'getpwuid(): uid not found: 492'
yum does not continue after this point.
I expect yum to handle the missing uid gracefully and continue verifying the files as usual.
My system is connected to a corporate NIS server with ypbind.
Catching the exception with this commit
feel free to apply it and test, but I'm pretty sure it works.
yum-3.2.24-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
yum-3.2.24-2.fc10 has been submitted as an update for Fedora 10.
yum-3.2.24-2.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.