Summary: | portage-2.1.11.62: If multiple items of DEPEND= || ( x1 x2 x3 ... ) are installed, --depclean should consider removing all but one of them | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Roman Žilka <roman.zilka> |
Component: | Core - Dependencies | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED DUPLICATE | ||
Severity: | enhancement | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Roman Žilka
2013-05-12 15:00:13 UTC
More precisely, in the simplest form what I'm asking for is --depclean being able to deal with the || dependency operator. So that if only, say, virtual/awk depended on || ( busybox smthg1 smthg2 ), and virtual/dev-manager didn't exist, --depclean would remove busybox, because it can see that I also have sys-apps/gawk which is enough to satisfy the needs of virtual/awk. gawk is needed by some other packages, too, so there would be no offer of what to remove - whether busybox or gawk. The next step would be depclean's awareness of all ||-style dependencies of all installed packages and the ability to prune as many of those ||-alts as possible across all packages. That would also let depclean recognize the situation I described originally, where busybox is pulled in by two packages. With only the ability described in the previous paragraph, depclean wouldn't know that I don't need busybox: it would check the ||-alts of virtual/awk, know that I have both gawk and busybox, try to, sort of, "--pretend"-remove each one of them, but find out that both are needed by some other package and leave them both in place. Finally, the ultra version would be something like --depclean --deep. That would possibly lead to both unmerging and emerging operations in one go. The behavior that you request is already implemented by these commits: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4f66159887fc4e3ec8bd87ae0f08ba249f98631b http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e6a9e9692a8e98ccf45d90447ae083619b6f47f9 For example, this behavior triggers removal of sys-apps/less as reported in bug 370295. (In reply to comment #0) > $ equery d busybox You should not trust equery depends, at least because of bug 370295. Use `emerge --pv --depclean <atom>` to check reverse dependencies as emerge sees them. (In reply to comment #2) > The behavior that you request is already implemented by these commits: > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit; > h=4f66159887fc4e3ec8bd87ae0f08ba249f98631b > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit; > h=e6a9e9692a8e98ccf45d90447ae083619b6f47f9 > > For example, this behavior triggers removal of sys-apps/less as reported in > bug 370295. > > (In reply to comment #0) > > $ equery d busybox > > You should not trust equery depends, at least because of bug 370295. > > Use `emerge --pv --depclean <atom>` to check reverse dependencies as emerge > sees them. Important stuff, thanks. Turns out I've got busybox for a different reason entirely: @system. Do you happen to know why is busybox in @system? I wonder if I should open a bug asking to have it removed. (In reply to comment #3) > Important stuff, thanks. Turns out I've got busybox for a different reason > entirely: @system. Do you happen to know why is busybox in @system? I wonder > if I should open a bug asking to have it removed. It's in the system set since it's useful as a rescue shell if things like coreutils get broken somehow (see bug #94918). You can remove it from your system profile like this: mkdir -p /etc/portage/profile echo '-*sys-apps/busybox' >> /etc/portage/profile/packages This reverses the setting from ${PORTDIR}/profiles/default/linux/packages. *** This bug has been marked as a duplicate of bug 264434 *** |