Bug 443976 - gnome-packagekit displays uninstalled packages twice
gnome-packagekit displays uninstalled packages twice
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-packagekit (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Robin Norwood
Fedora Extras Quality Assurance
:
: 444249 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-24 09:44 EDT by petrosyan
Modified: 2008-05-13 11:01 EDT (History)
3 users (show)

See Also:
Fixed In Version: 0.1.12-12.20080430
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-13 11:01:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description petrosyan 2008-04-24 09:44:39 EDT
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 09:44:39 EDT
Created attachment 303625 [details]
screenshot illustrating the bug
Comment 2 Richard Hughes 2008-04-25 07:18:26 EDT
What does "pkcon search wesnorth" print?
Comment 3 petrosyan 2008-04-25 10:27:27 EDT
$ 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 06:54:30 EDT
*** Bug 444249 has been marked as a duplicate of this bug. ***
Comment 5 Richard Hughes 2008-04-26 06:56:05 EDT
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 12:51:51 EDT
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 17:44:51 EDT
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 18:02:49 EDT
>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 19:09:42 EDT
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.