Bug 476987 - search for BuildRequires using repoquery gives traceback
Summary: search for BuildRequires using repoquery gives traceback
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 10
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-18 14:50 UTC by Dan Horák
Modified: 2014-01-21 23:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-03 21:43:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dan Horák 2008-12-18 14:50:58 UTC
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 15:52:23 UTC
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 21:43:05 UTC
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.