This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 476987 - search for BuildRequires using repoquery gives traceback
search for BuildRequires using repoquery gives traceback
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
10
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-18 09:50 EST by Dan Horák
Modified: 2014-01-21 18:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-03 16:43:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dan Horák 2008-12-18 09:50:58 EST
yum-utils-1.1.19-1.fc10.noarch

[dan@eagle ~]$ repoquery --archlist=src --whatrequires wxGTK2-devel
Traceback (most recent call last):
  File "/usr/bin/repoquery", line 857, in <module>
    main(sys.argv)
  File "/usr/bin/repoquery", line 853, in main
    repoq.runQuery(regexs)
  File "/usr/bin/repoquery", line 507, in runQuery
    for p in self.doQuery(oper, prco): print p
  File "/usr/bin/repoquery", line 512, in doQuery
    return getattr(self, "fmt_%s" % method)(*args, **kw)
  File "/usr/bin/repoquery", line 549, in fmt_whatrequires
    require_recursive(name)
  File "/usr/bin/repoquery", line 544, in require_recursive
    for pkg in self.pkgSack.searchRequires(prov.split()[0]):
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 592, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 417, in _getSacks
    if self._pkgSack and thisrepo is None:
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 263, in __len__
    ret += len(sack)
ValueError: __len__() should return >= 0
Comment 1 Dan Horák 2009-01-09 10:52:23 EST
So the proper syntax for the query is
repoquery --repoid=fedora-source --archlist=src --whatrequires wxGTK-devel

and it works on both F-10 and rawhide. But there is no warning given about an invalid repoid value, only the output list is empty.
Comment 2 seth vidal 2009-03-03 16:43:05 EST
I've checked that issue in the first comment no longer produces a traceback.

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