Summary: | >=portage-2.1.2-r10: --tree does NOT show the dependency tree correctly | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS, REGRESSION |
Priority: | High | ||
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 167107 | ||
Attachments: |
[Portage 2.1.2-r9] emerge -uDNptv --with-bdeps=y world
[Portage 2.1.2-r10] emerge -uDNptv --with-bdeps=y world [Portage 2.1.2-r13] emerge -uDNptv --with-bdeps=y world `sort /var/lib/portage/world` add more "nomerge" nodes to the --tree display add more "nomerge" nodes to the --tree display |
Description
Arfrever Frehtes Taifersar Arahesis (RETIRED)
![]() Created attachment 111847 [details]
[Portage 2.1.2-r9] emerge -uDNptv --with-bdeps=y world
Created attachment 111849 [details]
[Portage 2.1.2-r10] emerge -uDNptv --with-bdeps=y world
Outputs of r{11,12} differ only in line:
[ebuild U ] sys-apps/portage-2.1.2-r13 [2.1.2-r10] USE="-build -doc -epydoc (-selinux)" LINGUAS="pl" 0 kB
Created attachment 111852 [details]
[Portage 2.1.2-r13] emerge -uDNptv --with-bdeps=y world
Created attachment 111854 [details]
`sort /var/lib/portage/world`
I think I can make the --tree display work better while still displaying packages in the exact reverse merge order. It seems like it's just a matter of adding "nomerge" nodes wherever possible. Note that the --tree display is inherently flawed because it can't show multiple parents of a given node. To solve that, will have to add a new option (see bug #169047). Created attachment 111872 [details, diff]
add more "nomerge" nodes to the --tree display
This patch should mostly solve the problem. It inserts "nomerge" nodes in order to fill in the tree structure. Packages may appear in the display list multiple times, and will be marked "nomerge" when their position in the list does not correspond to actual merge order.
One flaw in the algorithm as implemented in this patch is that it stops filling in the parents when it encounters a dependency cycle (I noticed this while looking at the output of `emerge -pet world`). It should work pretty well for most cases though.
Created attachment 111873 [details, diff]
add more "nomerge" nodes to the --tree display
This improved version actively avoids direct cycles in order to increase the likelihood of traversing all the way up to a root node. It's in svn r6136.
This has been released in 2.1.2-r14. |