Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591960 - extend --depclean to act similar to apt purge and remove inverse dependencies as well
Summary: extend --depclean to act similar to apt purge and remove inverse dependencies...
Status: RESOLVED DUPLICATE of bug 416907
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2016-08-23 21:05 UTC by gerion
Modified: 2022-03-05 03:04 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 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.
Comment 1 Zac Medico gentoo-dev 2016-10-21 05:44:58 UTC
*** Bug 336889 has been marked as a duplicate of this bug. ***
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-05 03:03:50 UTC
*** Bug 416907 has been marked as a duplicate of this bug. ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-05 03:04:11 UTC

*** This bug has been marked as a duplicate of bug 416907 ***