Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 635752

Summary: portage - support of emerge package dependencies to certain depth
Product: Portage Development Reporter: Ladislav Zitka <archenroot>
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: 2046411367, esigra, josef64, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723    

Description Ladislav Zitka 2017-10-29 08:22:50 UTC
It happen to me quite often during few years of usage I was forced to rebuild the package dependency tree. While emerge supports switch -e, this is sometimes overkill, as this trigger recompile of dozen of packages.

In case of vmware-workstation for example 294, but in case of Kde env it is much more.

So how about let portage set to emerge only certain depth of dependencies to be recompiled?

We can achieve such behaviour in not easy to use way as below:
PACKAGES=$(equery -C -q depgraph --depth=1 sci-mathematics/gismo | tail --lines=+2 | head --lines=-1 | cut -d\  -f6 | sed 's/.*/=\0/' | tr '\n' ' ')
emerge -pv1 ${PACKAGES}

or 

emerge -1a $(equery -C g --depth=2 =category/package-version | awk '/^[[:blank:]]\[/ {sub(/^[\]\[0-9[:blank:]]+/,"="); print $0}' | xargs emerge --color n -qp 2> /dev/null | awk '/^\[ebuild...R/ {sub(/^\[ebuild.+] /,"="); print $0}')

Is it something to be considered as new feature into portage?
Comment 1 Ladislav Zitka 2017-10-29 08:24:00 UTC
I mean something like:
emerge -e --depth={number} packagename
Comment 2 2046411367 2021-07-12 20:33:16 UTC
I very much support this proposal. The recompilation triggered by the - e option is not much different from the recompilation of the entire Gentoo. It's really not necessary.