Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787755 - sys-apps/portage: emerge option to recursively remove a package and its reverse dependencies
Summary: sys-apps/portage: emerge option to recursively remove a package and its rever...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 155723 300071
  Show dependency tree
 
Reported: 2021-05-02 18:18 UTC by Zac Medico
Modified: 2021-05-19 16:49 UTC (History)
3 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 Zac Medico gentoo-dev 2021-05-02 18:18:02 UTC
An option to recursively remove a package and its reverse dependencies will complement the related option requested in bug 416907. It's possible to achieve an equivalent result by using emerge --deselect <packages> && emerge --depclean, but we need an automated way to determine the recursive reverse dependencies in the emerge --deselect <packages> list, and we don't want to invoke the global emerge --depclean command.
Comment 1 Zac Medico gentoo-dev 2021-05-02 18:45:32 UTC
This calculation is useful for various conflict resolution strategies, since it can be used to actively eliminate packages with conflicting or unsatisfiable dependencies. It can possibly be adapted as a means to automatically constrain the scope of emerge --keep-going calculations to fit the behavior described in bug 476350.
Comment 2 Zac Medico gentoo-dev 2021-05-02 18:54:05 UTC
Since emerge --depclean already builds a suitable dependency graph for this calculation, it's just a matter of performing the graph operations to determine which packages would have to be deselected, which should only be a few lines of code if expressed well.
Comment 3 Zac Medico gentoo-dev 2021-05-02 19:00:47 UTC
Simply traverse graph edges from the packages that we would like to remove, and use the PackageSet iterAtomsForPackage method to pair edges with matching @selected atoms that need to be deselected.