Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731150 - sys-apps/portage does not enforce dependencies on installed non-@world packages
Summary: sys-apps/portage does not enforce dependencies on installed non-@world packages
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 625164 750185 750368 (view as bug list)
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2020-07-07 06:18 UTC by Michał Górny
Modified: 2021-07-12 20:22 UTC (History)
5 users (show)

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


Attachments

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