Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 754777 - sys-apps/portage: finer-grained scoring for prioritization of build-time dependencies in emerge dependency cycle handling
Summary: sys-apps/portage: finer-grained scoring for prioritization of build-time depe...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
Depends on:
Blocks: 155723 build-order
  Show dependency tree
Reported: 2020-11-15 23:21 UTC by Zac Medico
Modified: 2021-02-21 14:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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.