I have virtual/editor installed, which can be provided by "app-editors/nano" or "sys-apps/ed". I have both of them installed. "nano" was installed as a part of "system" and "ed" was installed as a dependency of some packages. If I run emerge --depclean SOMETIMES it wants to remove "nano" and sometimes it doesn't want to remove it. That is what I see in "emerge --depcelan -pv". If it removes "nano": sys-apps/ed-1.6 pulled in by: app-text/texlive-core-2012-r1 requires sys-apps/ed virtual/editor-0 requires sys-apps/ed If it keeps "nano": app-editors/nano-2.3.2 pulled in by: virtual/editor-0 requires app-editors/nano So sometimes it chooses "ed" as "virtual/editor" provider and sometimes it chooses "nano". I think, that "emerge --depclean" output should be exact and not random. Can you please fix it?
If 'ed' is installed, like as a dependency of app-text/texlive-core, then virtual/editor is satisfied If 'nano' is installed, then virtual/editor is satisfied If both are installed, --depclean should choose to remove 'nano' instead of 'ed' because 'ed' is also required as a dependency for app-text/texlive-core So, based on information in Comment #0, I don't see a bug here, quite the opposite...
As in, you should simply 'emerge --noreplace <package>' the editor you want to keep using, and not rely on Portage to provide you with one
The solution is to declare your preferences by adding desired packages to your world file, so that those packages won't be removed by depclean. For example, if you want to keep nano, add it to your world file like this: emerge --noreplace app-editors/nano *** This bug has been marked as a duplicate of bug 377045 ***