Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 4229 - emerge --pretend in a tree listing format
Summary: emerge --pretend in a tree listing format
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2002-06-27 07:00 UTC by Aniruddha Shankar
Modified: 2011-10-30 22:21 UTC (History)
5 users (show)

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


Attachments
patch for portage.py/emerge (bugs.4229.patch,1.29 KB, patch)
2003-08-04 10:50 UTC, Masatomo Nakano (RETIRED)
Details | Diff
patch for portage.py/emerge (bugs.4229.patch,2.62 KB, patch)
2003-08-06 20:29 UTC, Masatomo Nakano (RETIRED)
Details | Diff
patch for portage.py/emerge (bugs.4229.patch,5.42 KB, patch)
2003-08-20 18:55 UTC, Masatomo Nakano (RETIRED)
Details | Diff
patch for emerge/portage.py (bugs.4229.patch,5.44 KB, patch)
2003-10-19 08:03 UTC, Masatomo Nakano (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aniruddha Shankar 2002-06-27 07:00:38 UTC
Emerge --pretend should list packages in a tree format so that we can understand which 
packages depend on which ones. 

Example

 foo  [ U]
   \---- > bar [N]
   \-----> bork [U]
                 \--- >bleh [U]
  bleep [N]
    \-----> bloop [U]
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-03 01:38:06 UTC
Dont know if this could be a nice feature ..
Comment 2 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-04 10:44:30 UTC
I made a patch two weeks ago for this.
But I'm not sure it's useful..

example.
# emerge -pve lv

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] app-text/lv-4.49.5-r1
-[ebuild  N    ] sys-libs/ncurses-5.3-r1  -debug
--[ebuild  N    ] sys-devel/patch-2.5.9  -build -static
---[ebuild  N    ] sys-libs/glibc-2.3.2-r1  +nls -pic -build -nptl
----[ebuild  N    ] sys-devel/gcc-3.2.3-r1  -static +nls -bootstrap +java -build
-----[ebuild  N    ] sys-devel/binutils-2.14.90.0.2  +nls -bootstrap -build
------[ebuild  N    ] dev-lang/perl-5.8.0-r12  +berkdb -doc +gdbm -threads
-------[ebuild  N    ] sys-devel/libperl-5.8.0  +berkdb +gdbm
--------[ebuild  N    ] sys-apps/portage-2.0.49_pre17  -build
---------[ebuild  N    ] dev-lang/python-2.2.3-r1  +readline +tcltk +berkdb -bootstrap -build -doc
----------[ebuild  N    ] dev-lang/tk-8.3.4-r1
-----------[ebuild  N    ] x11-base/xfree-4.3.0-r2  -3dfx -sse +mmx +3dnow -xml +truetype +nls +cjk -doc -bindist
------------[ebuild  N    ] app-arch/cabextract-0.6
------------[ebuild  N    ] app-arch/unzip-5.50-r2
(snip)
Comment 3 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-04 10:50:44 UTC
Created attachment 15490 [details, diff]
patch for portage.py/emerge
Comment 4 SpanKY gentoo-dev 2003-08-04 15:32:48 UTC
well the idea is this:  
  
emerge bitchx -p  
-[ebuild  N    ] sys-libs/glibc-2.2.5-r8 
---[ebuild  N    ] app-text/ghostscript-7.05.6-r3 
--[ebuild  N    ] net-print/cups-1.1.19-r1 
--[ebuild  N    ] media-libs/fontconfig-2.2.1 
--[ebuild  N    ] app-arch/cabextract-0.6 
-[ebuild  N    ] x11-base/xfree-4.3.0-r3 
-[ebuild  N    ] sys-libs/ncurses-5.3-r3 
-[ebuild  N    ] dev-libs/openssl-0.9.6j 
[ebuild  N    ] net-irc/bitchx-1.0.19-r5 
 
that way you can say 'ok, so bitchx will pull in ssl, curses, glibc, xfree ... xfree will 
pull in cabextract, fontconfig, cups ... cups will pull in ghostscript' 
 
you're not sitting there going 'ok, wth is pullin in ghostscript and how can i kill 
them' 
Comment 5 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-04 15:41:56 UTC
My patch just reverses the list. Which is good? 
I like my style. :)
Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-04 15:44:05 UTC
And do we need new option for this(example --depth)?
Or it works when you append --verbose.
Comment 7 SpanKY gentoo-dev 2003-08-04 16:25:13 UTC
reversing it is fine so long as it does a correct tree ;) 
 
i'd say just piggyback 'verbose' 
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2003-08-06 01:24:35 UTC
Use --tree

Buy change the format using whitespace instead of '-' and
only vary the positioning.

[XXXXXX FLAGS] net-irc/bitchx
[XXXXXX FLAGS]   dev-libs/openssl


Better tree-like ordering would be nice, but can be worked out later.
Comment 9 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-06 20:29:50 UTC
Created attachment 15652 [details, diff]
patch for portage.py/emerge

I modified.

# emerge -pe --tree lv

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] app-text/lv-4.49.5-r1
[ebuild  N    ]  sys-libs/ncurses-5.3-r1
[ebuild  N    ]   sys-libs/glibc-2.3.2-r1
[ebuild  N    ]    sys-devel/gcc-3.2.3-r1
[ebuild  N    ]     sys-devel/binutils-2.14.90.0.2
[ebuild  N    ]      dev-lang/perl-5.8.0-r12
(snip)
Comment 10 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-20 18:55:10 UTC
Created attachment 16404 [details, diff]
patch for portage.py/emerge

I improved this patch when it's specified --deep option
I think this patch is very usuful for beginer and expert of portage

Example ("nomerge" lines are darkblue.)
# emerge -UDp --tree world
>>> --upgradeonly implies --update... adding --update to options.

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
*** Portage will stop merging at this point and reload itself,
    recalculate dependencies, and complete the merge.

[nomerge      ] dev-php/mod_php-4.3.2-r4
[nomerge      ]  net-libs/libwww-5.4.0-r1
[ebuild     U ]  media-libs/freetype-1.3.1-r3 [2.1.4]
[nomerge      ] app-i18n/canna-3.6_p3-r2
[ebuild  N    ]  x11-base/xfree-4.3.0-r2
[ebuild     U ] sys-kernel/gentoo-sources-2.4.20-r6 [2.4.20-r5]
[nomerge      ] net-www/mod_auth_pgsql-0.9.12
[nomerge      ]  dev-db/postgresql-7.3.4
[nomerge      ]   app-admin/sudo-1.6.7_p5
[ebuild  N    ]   dev-db/postgresql-tools-7.3.4
[ebuild  N    ]    dev-db/postgresql-libs-7.3.4
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2003-09-09 13:29:29 UTC
this looks quite relly good, could this plz be added soon
Comment 12 Masatomo Nakano (RETIRED) gentoo-dev 2003-10-19 08:03:37 UTC
Created attachment 19474 [details, diff]
patch for emerge/portage.py

new patch for current portage sources
Comment 13 rob holland (RETIRED) gentoo-dev 2003-10-22 04:28:33 UTC
I second that request, this make emerge -u --deep world make sense :)
Comment 14 Nicholas Jones (RETIRED) gentoo-dev 2003-10-26 22:56:44 UTC
Nice. You even caught --tree --columns. :)

Looking it over now.
Comment 15 Nicholas Jones (RETIRED) gentoo-dev 2003-11-08 11:13:31 UTC
Included for next release.