Summary: | portage --depclean wrong behaviour when specifying single package | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Francesco Lamonica <alienpenguin> |
Component: | [OLD] baselayout | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gef.kornflakes, gentoo-bugs |
Priority: | High | Keywords: | InVCS |
Version: | 2008.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 210077, 265206, 268228 |
Description
Francesco Lamonica
2009-02-23 11:34:31 UTC
You can use the "--prune" option for this kind of task. "--prune (-P) WARNING: This action can remove important packages! Removes all but the highest installed version of a package from your system. Use --prune together with --verbose to show reverse dependencies or with --nodeps to ignore all dependencies." And IMHO, this is the expected behavior of the "--depclean <atom>" syntax : "Depclean serves as a dependency aware version of --unmerge. When given one or more atoms, it will unmerge matched packages that have no reverse dependencies. Use --depclean together with --verbose to show reverse dependencies." well, i am not questioning the reasoning behind --prune and --depclean: i've seen there's been quite a lot of discussion about this topic :) but then... i don't really see the reason why "emerge --depclean" unmerges say 3 vanillakernelsources and "emerge --depclean vanilla-source" unmerges 4! that is not consistent behaviour imho. (In reply to comment #2) > don't really see the reason why "emerge --depclean" unmerges say 3 > vanillakernelsources and "emerge --depclean vanilla-source" unmerges 4! that is > not consistent behaviour imho. The difference is that --depclean <atom> acts as if the matched packages are not in the world file. If there are no reverse dependencies, atoms corresponding to the matched packages will be removed from the world file when those packages are uninstalled. It's intended to act similarly to --unmerge, which also removes packages from the world file when they are uninstalled. I see what you mean by saying that the behavior is inconsistent. However, I think it's too late to change the default behavior at this point. We could add another options if some other behavior is needed, but --prune is already pretty close to what you want. I think I'll add a --deselect action/option that can be used to remove packages from the world file. When used alone (without --depclean, --prune, or --unmerge), it will remove matched packages from the world file. When --deselect=n is used together with an uninstall action such as --depclean, --prune, or --unmerge, it will prevent the matched packages from being removed from the world file (default behavior for these actions will be --deselect=y). The new --deselect action/option is in svn r13363. This is fixed in 2.2_rc31. This is fixed in 2.1.6.12. |