Bug 735604 - Repository cost not respected in dependency resolved packages
Summary: Repository cost not respected in dependency resolved packages
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-03 23:33 UTC by Henrik Nordström
Modified: 2014-01-21 23:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 17:59:13 UTC


Attachments (Terms of Use)
Use repository cost when selecting packages after depenency resolution (884 bytes, patch)
2011-09-03 23:33 UTC, Henrik Nordström
no flags Details | Diff

Description Henrik Nordström 2011-09-03 23:33:36 UTC
Created attachment 521351 [details]
Use repository cost when selecting packages after depenency resolution

Description of problem:

In the arm-hardfp bootstrap we have multiple repositories carrying different quality builds of the same NVR, using cost to deprecate the older builds. This however fails on yum-builddep installed packages.

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

3.2.29

How reproducible:

always

Steps to Reproduce:
1. participate in the armv7-hardfp bootstrap
2. try to build some package
3. monitor root.log output
  
Actual results:

Too many packages selected from the old stage3 repository where newer builds of the same NVR is available in stage4 at a lower cost.


Expected results:

The lowest cost packages should have been selected

Additional info:

See attached patch for one possible solution. But not sure it's the best or even correct (not really a python programmer)

Comment 1 James Antill 2011-09-16 19:24:59 UTC
 Can you show:

yum-config-manager | egrep '^\[|cost'
yum repolist
yum --show-duplicates list "blah"

...where "blah" is a package.

Comment 2 Henrik Nordström 2011-09-16 23:39:27 UTC
The problem manifests itself on dependency installed packages only. Explicitly installed packages have their cost respected.




yum-config-manager | egrep '^\[|cost'
[main]
[stage4]
cost = 1000
[stage3-full]
cost = 3000

yum repolist
repo id                      repo name                                   status
stage4                       fedora armhfp stage4                        8576
stage3                       fedora stage3                               2750
repolist: 11326

yum --showduplicates list "arts"
Available Packages
arts.armv7hl            8:1.5.10-13.fc15            stage4


yum --disablerepo stage4 --showduplicates list "arts"
Available Packages
arts.armv7hl            8:1.5.10-13.fc15            stage3




When reading the source the following pattern were seen

1. Lists of candidate packages created, ordered by repository cost with preferred candidate first.
2. Dependency resolution then places them in a PackageSack where the packages gets resorted, throwing away the original sort order.
3. returnNewestByNameArch handles them in "random" order, based on whatever order a python dictionary happened to result in (unspecified).



It should be easy to reproduce by creating two repositories with different cost and just two packages each, "a" and "b" where "a" requires "b". Then try to install "a", while varying the cost of the repositories. Probably even works configuring the same repository twice with different cost and trying to install something depending on something else not already installed.

Comment 3 Fedora Admin XMLRPC Client 2012-04-27 15:40:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2012-08-07 17:59:16 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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