Bug 443976 - gnome-packagekit displays uninstalled packages twice
Summary: gnome-packagekit displays uninstalled packages twice
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-packagekit
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Robin Norwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 444249 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-24 13:44 UTC by petrosyan
Modified: 2008-05-13 15:01 UTC (History)
3 users (show)

Fixed In Version: 0.1.12-12.20080430
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-13 15:01:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
screenshot illustrating the bug (76.47 KB, image/png)
2008-04-24 13:44 UTC, petrosyan
no flags Details
suggested pacth (1.55 KB, patch)
2008-04-27 23:09 UTC, Richard Hughes
no flags Details | Diff

Description petrosyan 2008-04-24 13:44:39 UTC
Description of problem:
gnome-packagekit displays uninstalled packages twice. The attached screenshots
describes the bug very well.

Version-Release number of selected component (if applicable):
gnome-packagekit-0.1.12-5.20080416git.fc9.x86_64

How reproducible:
Always

Steps to Reproduce:
1. search for any not installed package in gnome-packagekit

Comment 1 petrosyan 2008-04-24 13:44:39 UTC
Created attachment 303625 [details]
screenshot illustrating the bug

Comment 2 Richard Hughes 2008-04-25 11:18:26 UTC
What does "pkcon search wesnorth" print?

Comment 3 petrosyan 2008-04-25 14:27:27 UTC
$ pkcon search name wesnoth
available    wesnoth              x86_64  1.4.1-1.fc9     fedora      
Turn-based strategy game with a fantasy theme
available    wesnoth              x86_64  1.4.1-1.fc9     updates     
Turn-based strategy game with a fantasy theme

Comment 4 Richard Hughes 2008-04-26 10:54:30 UTC
*** Bug 444249 has been marked as a duplicate of this bug. ***

Comment 5 Richard Hughes 2008-04-26 10:56:05 UTC
Sure, the two repos are providing the same package. PackageKit can't filter
this, as it wouldn't know which one to filter. Surely this is a repo problem?

Comment 6 Basil Mohamed Gohar 2008-04-26 16:51:51 UTC
I did not find packages in both the "installed" and updates repositories...any
other things I can help test for to fix this bug?

Comment 7 Matthias Clasen 2008-04-27 21:44:51 UTC
Richard, the repository display in gpk-application is still broken, btw.

All of the duplicate packages I see show "Fedora Rawhide", even thought the
duplicates come from the "Fedora Development Koji" repository. 
gpk-repo gets the repo names right.

Comment 8 Richard Hughes 2008-04-27 22:02:49 UTC
>show "Fedora Rawhide", even thought the duplicates come from the "Fedora
Development Koji" repository. 

Hmm. I think the yum backend might be the problem here:

       # search the rpmdb for the nevra
        pkgs = self.yumbase.rpmdb.searchNevra(name=n,epoch=e,ver=v,rel=r,arch=a)
        # if the package is found, then return it
        if len(pkgs) != 0:
            return pkgs[0],True
        # search the pkgSack for the nevra
        try:
            pkgs =
self.yumbase.pkgSack.searchNevra(name=n,epoch=e,ver=v,rel=r,arch=a)
        except yum.Errors.RepoError,e:
            self.error(ERROR_REPO_NOT_AVAILABLE,str(e))
        # if the package is found, then return it
        if len(pkgs) != 0:
            return pkgs[0],False
        else:
            return None,False

I.e. - if we are returning multiple matches on the NEVRA (no repo parameter)
then we return the first package. I'll try to fix that tonight.

Richard.


Comment 9 Richard Hughes 2008-04-27 23:09:42 UTC
Created attachment 303924 [details]
suggested pacth

This is what i'll put into git master - I'll sync with stable later this week.


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