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

Bug 731150

Summary: sys-apps/portage does not enforce dependencies on installed non-@world packages
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: ago, esigra, qa, sam, toralf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=199856
https://bugs.gentoo.org/show_bug.cgi?id=750041
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-07-07 06:18:43 UTC
So far I've assumed this to be inevitable but after getting n-th INVALID duplicate bug report about this, I'm really getting tired.  The problem roughly boils down to:

1. Install A without recording it in @world.

2. Install B that requires incompatible dependencies (i.e. rebuilds A's deps with other set of USE flags or unmerges them).

3. A will stay installed but its dependencies are no longer satisfied.

4. If you now install C that depends on A, Portage will assume that A is already installed correctly and ignore non-satisfied RDEPEND.

How to resolve this?  I have no clue.  Portage would either have to recursively verify whole dependency graph (doesn't -D do this?) while installing anything, or it would have to proactively unmerge packages once their dependencies are no longer satisfied.
Comment 1 Zac Medico gentoo-dev 2020-07-07 07:24:54 UTC
Yes, the -D / --deep option is one way to prevent this sort of miscalculation. However, --deep also has the side-effect of triggering upgrades when combined with the --update option.

The --complete-graph option is like --deep but without the above (possibly unwanted) side-effect. We currently have options like --complete-graph-if-new-use and --complete-graph-if-new-ver enabled by default in order to automatically trigger --complete-graph behavior for common cases where it is needed, but obviously these to not cover all cases. The case described in comment #0 is perhaps the most notable case which is not covered.
Comment 2 Zac Medico gentoo-dev 2020-10-19 05:01:29 UTC
*** Bug 625164 has been marked as a duplicate of this bug. ***
Comment 3 Tupone Alfredo gentoo-dev 2021-07-05 19:10:14 UTC
*** Bug 750368 has been marked as a duplicate of this bug. ***
Comment 4 Tupone Alfredo gentoo-dev 2021-07-12 20:22:01 UTC
*** Bug 750185 has been marked as a duplicate of this bug. ***