Bug 299331 - repoquery often crashes with --requires --resolve
repoquery often crashes with --requires --resolve
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-09-20 17:43 EDT by Rasmus Ory Nielsen
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-28 09:10:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rasmus Ory Nielsen 2007-09-20 17:43:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); da-DK; rv: Gecko/20070718 Fedora/ Firefox/

Description of problem:
When running repoquery --requires --resolve it crashes on some rpms. Without the --resolve I haven't seen it crash.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. repoquery --requires --resolve aspell-en

Actual Results:
Traceback (most recent call last):
  File "/usr/bin/repoquery", line 806, in <module>
  File "/usr/bin/repoquery", line 803, in main
  File "/usr/bin/repoquery", line 479, in runQuery
    for p in self.doQuery(oper, prco): print p
  File "/usr/bin/repoquery", line 484, in doQuery
    return getattr(self, "fmt_%s" % method)(*args, **kw)
  File "/usr/bin/repoquery", line 541, in fmt_requires
    for res in self.fmt_whatprovides(req):
  File "/usr/bin/repoquery", line 494, in fmt_whatprovides
    return self.returnPackagesByDepStr(name)
  File "/usr/bin/repoquery", line 416, in returnPackagesByDepStr
    matches = yum.YumBase.searchPackageProvides(self, [depstring])
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 1381, in searchPackageProvides
    where = self.returnInstalledPackagesByDep(arg)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 1718, in returnInstalledPackagesByDep
    pkglist = self.rpmdb.whatProvides(depname, depflags, depver)
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 419, in whatProvides
    return [po.pkgtup for po in self.getProvides(name, flags, version)]
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 412, in getProvides
    'provides', (name, flags, (r_e, r_v, r_r)))
UnboundLocalError: local variable 'r_e' referenced before assignment

Expected Results:
A list of deps.

Additional info:
Without the '--resolve' it doesn't crash:
[root@lucy ~]# repoquery --requires aspell-en
aspell >= 12:0.60
Comment 1 Rasmus Ory Nielsen 2007-09-20 17:49:48 EDT
To get a list of the rpms that makes repoquery crash:

for i in $(rpm -qa); do echo ">>> $i"; repoquery --requires --resolve $i; done
Comment 2 Rasmus Ory Nielsen 2007-09-20 18:00:30 EDT
I've tested two older versions of repoquery and found that they do not crash.

Comment 3 Tim Lauridsen 2007-09-28 09:10:04 EDT
Fixed upstream, will be available in yum-utils-1.1.8

Note You need to log in before you can comment on or make changes to this bug.