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

Bug 754777

Summary: sys-apps/portage: finer-grained scoring for prioritization of build-time dependencies in emerge dependency cycle handling
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: esigra, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=199856
https://bugs.gentoo.org/show_bug.cgi?id=754903
https://bugs.gentoo.org/show_bug.cgi?id=756199
https://bugs.gentoo.org/show_bug.cgi?id=834572
https://bugs.gentoo.org/show_bug.cgi?id=917259
https://bugs.gentoo.org/show_bug.cgi?id=921333
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723, 689644    

Description Zac Medico gentoo-dev 2020-11-15 23:21:02 UTC
A common source of build failures related to bug 199856, occurs when emerge attempts to break a dependency cycle by merging a package which has a build time dependency that it assumes to be satisfied by an installed package. If the installed package that it assumes satisfies the dependency is broken in some way, such as due to its own dependencies being broken by an upgrade, then it can trigger a build failure. For example, the build failure related to bug 749777 occurred when emerge assumed that a qtgui dependency was satisfied even though the installed qtgui instance had been broken by a qtcore upgrade.

When emerge needs to assume that a dependency will be satisfied by an installed package, it can make a better choice if it prioritizes the importance of a given dependency based on various properties. Already, emerge's DepPrioritySatisfiedRange assigns higher priority to build time slot operator := dependencies. It will make better choices if this prioritization is based on finer-grained scoring, based on comparison of the installed package to its replacement(s):

1) In come cases, the installed package might be scheduled for uninstall in order to resolve a soft blocker. It's possible for a new slot to trigger uninstallation of an old slot in this way. A dependency on this sort of package should be given higher priority than most.

2) The installed package might be scheduled for rebuild or upgrade. Upgrades should have higher priority than plain rebuilds. Slot and subslot changes should increase priority. USE changes should also increase priority.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-13 16:28:26 UTC
See https://bugs.gentoo.org/756199#c3 for some old WIP patches too.