Bug 14906 - pk-application can not handle yum.Errors.GroupsError
Summary: pk-application can not handle yum.Errors.GroupsError
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: backend-yum (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-08 15:21 UTC by Debarshi Ray
Modified: 2008-03-10 13:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Traceback screenshot (61.03 KB, image/png)
2008-03-08 15:21 UTC, Debarshi Ray
Details
Proposed fix. (1022 bytes, patch)
2008-03-09 07:14 UTC, Debarshi Ray
Details | Splinter Review

Description Debarshi Ray 2008-03-08 15:21:49 UTC
Created attachment 14963 [details]
Traceback screenshot

I have disabled all upstream Fedora repositories and only have a local repository on my hard disk, which does not have any groups. Running pk-application and selecting any group in the Groups tab spits out a traceback (screenshot attached):

Error Type: <class 'yum.Errors.GroupsError'>
Error Value: No Groups Available in any repository
  File : /usr/share/PackageKit/helpers/yum/search-group.py , line 21, in <module>
    backend.search_group(options,searchterms)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py , line 455, in search_group
    pkgGroupDict = self._buildGroupDict()
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py , line 427, in _buildGroupDict
    cats = self.yumbase.comps.categories
  File : /usr/lib/python2.5/site-packages/yum/__init__.py , line 545, in <lambda>
    comps = property(fget=lambda self: self._getGroups(),
  File : /usr/lib/python2.5/site-packages/yum/__init__.py , line 518, in _getGroups
    raise Errors.GroupsError, 'No Groups Available in any repository'

Installed packages:
gnome-packagekit-0.1.9-1.fc9
PackageKit-0.1.9-1.fc9
PackageKit-libs-0.1.9-1.fc9
yum-3.2.8-2.fc8
Comment 1 Debarshi Ray 2008-03-09 07:14:45 UTC
Created attachment 14976 [details] [review]
Proposed fix.

The attached patch fixes the problem for me. Is it the correct approach?
Comment 2 Richard Hughes 2008-03-09 11:58:40 UTC
Yes, fix looks great. Please can you push when I have given you commit access. Thanks.
Comment 3 Debarshi Ray 2008-03-09 23:51:02 UTC
(In reply to comment #2)

> Please can you push when I have given you commit access.

Ok. I will do that.
Comment 4 Debarshi Ray 2008-03-10 13:17:29 UTC
(In reply to comment #2)

> Yes, fix looks great. Please can you push when I have given you commit access.

Committed and pushed to upstream as '6de9695280a20dfd270f91fe5f2fe4889872c786'.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.