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

Bug 892539

Summary: sys-apps/portage-3.0.43-r1: `emerge --depclean --with-bdeps=n` doesn't clean IDEPENDs
Product: Portage Development Reporter: Alexander Kurakin <kuraga333>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: normal CC: ionen, kuraga333
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alexander Kurakin 2023-01-29 23:13:49 UTC
Package A has package B in IDEPEND. No one more has B as any dependency.

`emerge --depclean --with-bdeps=n` doesn't unmerge B. It's unexpected, as discussed on IRC.
Comment 1 Ionen Wolkens gentoo-dev 2023-01-30 01:19:50 UTC
IDEPEND can be used to satisfy dependencies used by e.g. pkg_pre/postrm() ran when a package is unmerged, and there's no mechanism to re-install these dependencies while depcleaning.
Comment 2 Alexander Kurakin 2023-01-30 11:18:08 UTC
So, do you mean:

1. `IDEPEND`s are needed on `pkg_prerm`, `pkg_postrm` [1].
2. So they aren't cleaned and this is a cause.

Then, questions:

1. Right?
2. Is there a way to force clean?
3. Should be there a way to force clean?
4. Is there a *theoretically* scenario to solve it this way:
     a. `IDEPEND`s are cleaned on (some) depcleans,
     b. but they are (re-)installed before some package's unmerge.
        (Yes, I understand: at least, this introduce a cyclic dependencies probability.)
   ?
5. Maybe, should we add some notes to the documentation?
   BTW,
     $  man emerge | grep "install-time" | wc -c  # => 0

Thanks!

---

[1] https://projects.gentoo.org/pms/8/pms.html#x1-720008.1