Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38070 - A shorter 'emerge -p --tree' output
Summary: A shorter 'emerge -p --tree' output
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-01-13 03:50 UTC by TGL
Modified: 2004-02-08 17:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
tree-cut.patch (tree-cut.patch,2.41 KB, patch)
2004-01-13 03:51 UTC, TGL
Details | Diff
worldtree-nopatch.log (worldtree-nopatch.log,6.25 KB, text/plain)
2004-01-13 03:53 UTC, TGL
Details
worldtree-patched.log (worldtree-patched.log,2.31 KB, text/plain)
2004-01-13 03:54 UTC, TGL
Details
mantree-nopatch.log (mantree-nopatch.log,3.39 KB, text/plain)
2004-01-13 03:56 UTC, TGL
Details
mantree-patched.log (mantree-patched.log,1.29 KB, text/plain)
2004-01-13 03:57 UTC, TGL
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2004-01-13 03:50:56 UTC
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:
Comment 1 TGL 2004-01-13 03:51:52 UTC
Created attachment 23726 [details, diff]
tree-cut.patch

Patch is against 2.0.50_pre12.
Comment 2 TGL 2004-01-13 03:53:38 UTC
Created attachment 23727 [details]
worldtree-nopatch.log

Example: "emerge -puDt world" without the patch.
Comment 3 TGL 2004-01-13 03:54:26 UTC
Created attachment 23728 [details]
worldtree-patched.log

Example: "emerge -puDt world" with the patch.
Comment 4 TGL 2004-01-13 03:56:18 UTC
Created attachment 23729 [details]
mantree-nopatch.log

Example: "emerge -puDt man" without the patch.
Comment 5 TGL 2004-01-13 03:57:16 UTC
Created attachment 23730 [details]
mantree-patched.log

Example: "emerge -puDt man" with the patch.
Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2004-01-19 17:55:59 UTC
I modified the patch a little and comitted.
(Removed the lines which are used and moved the function to display(), etc)

Thank you
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2004-02-08 17:55:10 UTC
supposed to be fixed in 2.0.50 which is stable now. If this bug is not fixed please reopen.