Here is a patch that makes the 'emerge -p --tree' output shorter, by removing some irrelevant subtrees (those that don't lead to a package installation/update). I think the output it produces is just as informative as the original output, and more readable. By "as informative", I mean it answer the questions like "Why does portage wants to emerge Foo when I ask to emerge Bar?", which I thought was the main benefit of this feature. Note that if a user wants to use '--tree' to show all the deps of a package, then he can use still use it in conjonction with the '-e' (or use 'equery'). I will attach two output examples in both patched and non-patched modes, so that you can check it still fit what you had in mine with this feature. I've implemented the tree filtering algorithm in a separated function, mainly for readability, and removed the existing filtering code from the main 'for' loop that was in function 'display()'. Reproducible: Always Steps to Reproduce:
Created attachment 23726 [details, diff] tree-cut.patch Patch is against 2.0.50_pre12.
Created attachment 23727 [details] worldtree-nopatch.log Example: "emerge -puDt world" without the patch.
Created attachment 23728 [details] worldtree-patched.log Example: "emerge -puDt world" with the patch.
Created attachment 23729 [details] mantree-nopatch.log Example: "emerge -puDt man" without the patch.
Created attachment 23730 [details] mantree-patched.log Example: "emerge -puDt man" with the patch.
I modified the patch a little and comitted. (Removed the lines which are used and moved the function to display(), etc) Thank you
supposed to be fixed in 2.0.50 which is stable now. If this bug is not fixed please reopen.