Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275823 - sys-apps/portage - emerge: --tree may lead to suboptimal handling of weak blocks
Summary: sys-apps/portage - emerge: --tree may lead to suboptimal handling of weak blocks
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2009-06-29 13:16 UTC by Sebastian Luther (few)
Modified: 2015-01-19 23:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Luther (few) 2009-06-29 13:16:55 UTC
Consider the following case:

deps:
Q: || ( Q-1 Q-2)
Q-1: W-1
Q-2: none
W-1: !Q-2

status:
Q-2 installed

command:
emerge =Q-1

expected result:
install W-1, upgrade Q-1 (in any order)

actual result:
(1)
emerge --ignore-default-opts -qp =Q-1.0
[ebuild  N    ] dev-libs/W-1.0
[ebuild     UD] dev-libs/Q-1.0 [2.0]
[blocks b     ] =dev-libs/Q-2.0 ("=dev-libs/Q-2.0" is blocking dev-libs/W-1.0)

This one is correct, except that the last line should be omitted from the output.

(2)
emerge --ignore-default-opts -qp --tree =Q-1.0
[nomerge      ] dev-libs/Q-1.0 [2.0]
[nomerge      ]  dev-libs/W-1.0 
[uninstall    ]    dev-libs/Q-2.0 
[blocks b     ]   =dev-libs/Q-2.0 ("=dev-libs/Q-2.0" is blocking dev-libs/W-1.0)
[ebuild     UD]    dev-libs/Q-1.0 [2.0]
[ebuild  N    ]     dev-libs/W-1.0 
[blocks B     ]   =dev-libs/Q-2.0 ("=dev-libs/Q-2.0" is blocking dev-libs/W-1.0)

This one is suboptimal.
Comment 1 Sebastian Luther (few) 2009-06-30 15:11:09 UTC
In _serialize_tasks: 
     if ignore_priority is None and not tree_mode:
changing this to 
     if ignore_priority is None:

results in:
[nomerge      ] dev-libs/Q-1.0 [2.0]
[nomerge      ]  dev-libs/W-1.0 
[blocks b     ]   =dev-libs/Q-2.0 ("=dev-libs/Q-2.0" is blocking dev-libs/W-1.0)
[ebuild     UD]    dev-libs/Q-1.0 [2.0]
[ebuild  N    ]     dev-libs/W-1.0 
for case (2), which is correct and optimal.

I checked parts of my emerge -et system and emerge -et world for errors and couldn't find one (note that it changes the order). 
Comment 2 Sebastian Luther (few) 2009-06-30 15:21:10 UTC
Ahh, forget it, it got the order wrong now :(