Bug 30240 - PackageKit yum backend does not honor the cost option in repository configurations
Summary: PackageKit yum backend does not honor the cost option in repository configura...
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: 2010-09-17 05:26 UTC by Hedayat Vatankhah
Modified: 2010-09-24 04:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
select the repository to install the package from with the same ordering as yum command line (1.05 KB, patch)
2010-09-23 15:20 UTC, Hedayat Vatankhah
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Hedayat Vatankhah 2010-09-17 05:26:59 UTC
I have two repositories enabled: Fedora repository and a local repository from Fedora DVD. The local repositories has this option "cost=500". Because of this, when a package is available both in Fedora and Fedora DVD repositories, package kit show show Fedora DVD repository as the package's repository and should try to install the package from the DVD repository with the lower cost (as yum itself does). But currently (latest F13 package), it tries to install from Fedora repository despite the higher cost of this repository.
Comment 1 Richard Hughes 2010-09-17 05:44:31 UTC
Is it exactly the same package on the dvd and in the repos?
Comment 2 Hedayat Vatankhah 2010-09-17 06:40:56 UTC
Yes.
Comment 3 Hedayat Vatankhah 2010-09-23 15:20:53 UTC
Created attachment 38921 [details] [review]
select the repository to install the package from with the same ordering as yum command line

Well, I decided to see if I can discover the problem, and I think the attached patch (against PackageKit-yum-0.6.6-2.fc13.x86_64's yumFilter.py) fixes the problem. The problem relied in the _do_newest_filtering function.
Comment 4 Richard Hughes 2010-09-24 00:49:44 UTC
Hedayat, the patch looks good. You've done quite a few PK patches now that I've applied, would you like direct commit access? If so, please create an account on http://gitorious.org and send me your username. If you would rather not, that's fine too, and I can commit your patch for you.

Thanks.
Comment 5 Hedayat Vatankhah 2010-09-24 01:26:00 UTC
Thanks for the offer. I would like too. My gitorious account username is hedayat.
Comment 6 Richard Hughes 2010-09-24 01:28:58 UTC
Please commit your patch and push to git master. As it's a yum-related change, please prefix the commit message with "yum: " and then it gets sorted in the release notes into the right section. Thanks dude.
Comment 7 Hedayat Vatankhah 2010-09-24 04:20:46 UTC
Pushed to master 

commit a1227392324437f59869ef312dff8017daed07db
Author: Hedayat Vatankhah <hedayat@grad.com>
Date:   Fri Sep 24 12:46:59 2010 +0330

    yum: select the repository with the higher priority when a package exists in


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.