Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 600346

Summary: sys-apps/portage: dep_zapdeps highest_cpv variable needs to satisfy all atoms for a given $CATEGORY/$PN
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Severity: normal CC: chewi, esigra
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723, 604854    

Description Zac Medico gentoo-dev 2016-11-20 20:38:52 UTC
Bug 597752, comment #7 highlights some logic which can lead to incorrect re-ordering of choices in the dep_zapdeps function. The highest_cpv variable is used to keep track of the highest version of a given $CATEGORY/$PN that is matched by the atoms in the current choice. This variable currently does not account for cases where the highest match does not satisfy all atoms for the $CATEGORY/$PN, which can lead do incorrect re-ordering of choices as discussed in bug 597752, comment #7. What is needed is something like the depgraph._minimize_children method, which selects the minimum number of packages that satisfy all of the atoms for a particular choice.
Comment 2 Zac Medico gentoo-dev 2016-11-21 22:34:14 UTC
Note that package selection consistency provided by depgraph's _dep_check_composite_db only takes affect after a package is added to the graph. Therefore, for packages that have not been added to the graph yet, dep_zapdeps needs to handle package selection consistency internally.
Comment 4 Zac Medico gentoo-dev 2017-02-10 18:53:25 UTC
Fixed in portage-2.3.3.