Description of problem: See Summary Version-Release number of selected component (if applicable): yum-utils-1.1.24-2.fc12.noarch How reproducible: Seen twice in 2 tries. Steps to Reproduce: 1. On newly-installed F12 system, run as root: /usr/bin/package-cleanup --problems 2. 3. Actual results: # /usr/bin/package-cleanup --problems Loaded plugins: presto, refresh-packagekit Traceback (most recent call last): File "/usr/bin/package-cleanup", line 382, in <module> util = PackageCleanup() File "/usr/bin/package-cleanup", line 58, in __init__ self.main() File "/usr/bin/package-cleanup", line 309, in main issues = self._find_missing_deps(self.rpmdb.returnPackages()) File "/usr/bin/package-cleanup", line 137, in _find_missing_deps missing = miscutils.formatRequire(req,ver,flags) File "/usr/lib/python2.6/site-packages/rpmUtils/miscutils.py", line 350, in formatRequire rpm.RPMSENSE_EQUAL): TypeError: unsupported operand type(s) for &: 'str' and 'int' Expected results: No errors should occur. Additional info:
Same problem for me. This happens only if there are some versioning dependency problems, so if you want to reproduce, you have to make some. It's easy to fix in this code: /usr/lib/python2.6/site-packages/rpmUtils/miscutils.py: def formatRequire (name, version, flags): s = name if flags: if flags & (rpm.RPMSENSE_LESS | rpm.RPMSENSE_GREATER | rpm.RPMSENSE_EQUAL): s = s + " " if flags & rpm.RPMSENSE_LESS: s = s + "<" if flags & rpm.RPMSENSE_GREATER: s = s + ">" if flags & rpm.RPMSENSE_EQUAL: s = s + "=" if version: s = "%s %s" %(s, version) return s Why there is need to test "flags & ...", if all this code is inside "if flags:" block? Patch attached. Also changing component to yum, because this file is a part of yum package.
*** Bug 539335 has been marked as a duplicate of this bug. ***
Created attachment 378708 [details] Remove duplicate flags. As described in previous comment, removal of duplicate flags helps. Seth, please apply this.
Your patch always prints out "<>=" for the flags. Anyway, this should be fixed upstream already ... just waiting on a new yum-utils release in F12. *** This bug has been marked as a duplicate of bug 541551 ***