|Summary:||extend --depclean to act similar to apt purge and remove inverse dependencies as well|
|Product:||Portage Development||Reporter:||gerion <gerion.entrup>|
|Component:||Enhancement/Feature Requests||Assignee:||Portage team <dev-portage>|
|Package list:||Runtime testing required:||---|
|Bug Depends on:|
Description gerion 2016-08-23 21:05:00 UTC
It would be cool if emerge has an option (maybe as a suboption of depclean) to not only calculate whether a package could savely be removed but calculate what other packages has to be removed/modified to remove the package savely. This is similar to apt purge, but given the useflag system calculation should be more compilcated but also more powerful. What I have in mind is something like: --with-other-packages-minimal: calculate beside the requested package the removal of all packages that are needed for savely removal. If the requested package is only depended because a useflag is active, the useflag will be deactivated --with-other-packages: calculate beside the requested package the removal of all packages that are needed for savely removal. The output can then look like so: $ emerge --depclean --with-other-packages-minimal -a dev-foo/bar Calculating ... This package changes are necessary: [ebuild N ] dev-foo/foo [ebuild R ] media-foo/something USE="-bar" [ebuild remove ] dev-foo/bar2 [ebuild remove ] dev-foo/bar The following use changes are necessary to savely remove dev-foo/bar: media-foo/something USE="-bar" Reproducible: Always The motivation behind this feature request is, that you sometimes want to remove packages, but ran through different stages of "emerge --depclean -av ..." or "equery depends ..." to look what package has the wanted package as dependency, then looking whether the dependency can be eliminated via useflag, and if not, deciding to remove the package as well.