Bug 443101

Summary: repoquery: traceback on unsupported tag
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: james.antill, pmatilai, rvokal, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-18 19:17:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bill Nottingham 2008-04-18 17:04:53 UTC
Description of problem:


[root@localhost ~]# repoquery  -q --qf "%{NAME} %{BUILDDATE}\n" thunderbird
Traceback (most recent call last):
  File "/usr/bin/repoquery", line 829, in <module>
    main(sys.argv)
  File "/usr/bin/repoquery", line 826, in main
    repoq.runQuery(regexs)
  File "/usr/bin/repoquery", line 473, in runQuery
    print pkg.doQuery(oper)
  File "/usr/bin/repoquery", line 160, in doQuery
    return getattr(self, "fmt_%s" % method)(*args, **kw)
  File "/usr/bin/repoquery", line 190, in fmt_queryformat
    return fmt % self
  File "/usr/bin/repoquery", line 142, in __getitem__
    res = self.pkg.returnSimple(item)
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 208, in returnSimple
    return getattr(self, varname)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 134, in
__getattr__
    (self.pkgId,)).fetchone()
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 41, in newFunc
    raise Errors.RepoError
yum.Errors.RepoError: None

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

yum-utils-1.1.13-2.fc9.noarch

Comment 1 James Antill 2008-04-18 17:21:14 UTC
 We can't just catch RepoError ... so the only thing that comes to mind is to do
a whitelist of valid tags, which sucks (although that would give us a nice way
to list all valid tags).
 I guess we could start throwing something specific, for just this error. Meh.


Comment 2 James Antill 2008-04-18 17:22:02 UTC
 Nevermind ... we apparently already have a whitelist ... so easy fix.


Comment 3 Seth Vidal 2008-04-18 19:17:29 UTC
the problem is YumInstalledPackages raised a different exception than
YumAvailablePackages b/c of a global sqlite exception catch. I've made a fix for
this and now repoquery acts correctly. next release of yum will fix this.