Summary: | sys-apps/portage: implement backtracking for slot conflicts | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Sebastian Luther (few) <SebastianLuther> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 210077, 288499 | ||
Attachments: |
resolve the circular dep between Scheduler and depgraph; mark all functions as local that aren't used outside of depgraph
move changelog stuff stuff out of depgraph (needs changelog.py) changelog.py for part2 splits depgraph.select_files into select_files and _resolve Move all memeber variables of _emerge.depgraph into frozen_config or dynamic_config. Make emerge mask the first package pulled into the tree in case of a slot conflict and restart the dependency calculation |
Description
Sebastian Luther (few)
2009-06-23 19:56:19 UTC
Created attachment 195594 [details, diff]
resolve the circular dep between Scheduler and depgraph; mark all functions as local that aren't used outside of depgraph
Created attachment 195595 [details, diff]
move changelog stuff stuff out of depgraph (needs changelog.py)
Created attachment 195597 [details, diff]
changelog.py for part2
(In reply to comment #1) > Created an attachment (id=195594) [edit] > resolve the circular dep between Scheduler and depgraph; mark all functions as > local that aren't used outside of depgraph Thanks, this is in svn r13676. (In reply to comment #2) > Created an attachment (id=195595) [edit] > move changelog stuff stuff out of depgraph (needs changelog.py) Thanks, this is in svn r13677. Created attachment 195653 [details, diff]
splits depgraph.select_files into select_files and _resolve
In the long term all decision making shall be made in _resolve. select_files converts its input to args and _resolve uses the args to pull in the root nodes now.
(In reply to comment #5) > Created an attachment (id=195653) [edit] > splits depgraph.select_files into select_files and _resolve Thanks, this is in svn r13685. Created attachment 196212 [details, diff]
Move all memeber variables of _emerge.depgraph into frozen_config or dynamic_config.
This patch creates two classes in _emerge/depgraph.py: _frozen_depgraph_config and _dynamic_depgraph_config. They are supposed to hold all member variables of _emerge.depgraph. Those that may change after initialization belong to _dynamic_depgraph_config, others to _frozen_depgraph_config. depgraph itself holds only instances of these two classes.
(In reply to comment #7) > Created an attachment (id=196212) [edit] > Move all memeber variables of _emerge.depgraph into frozen_config or > dynamic_config. Thanks, this is in svn r13747. Just for reference: What is left? 1) Write wrapper functions for _dynamic_config to track changes to it. 2) Write a function that searches the point where offending packages were selected and reverts the dynamic_config to this point. 3) Write a function that figures out what to mask if something goes wrong. 4) modify _resolve to be somehow state less, so we can simply restart from any state. As discussed on irc, the simplest way implement backtracking (at least initially) is to try saving choices from depgraph, and then creating a whole new depgraph with slightly different choices. Right now I'm working on making the depgraph constructor take a _frozen_depgraph_config instance as a parameter, so that we can use a single instance for each depgraph we create. (In reply to comment #10) > Right now I'm working on making > the depgraph constructor take a _frozen_depgraph_config instance as a > parameter, so that we can use a single instance for each depgraph we create. This is done in svn r13760, and it's used to optimize resume_depgraph() in r13761. I looked at your backtracking patch with the _pref_list_lookup() function and I think that it would be better to use an approach similar to the one used to solve bug #253904, in which _dep_check_composite_db._visible() is used to influence the behavior of dep_zapdeps(). When a package is masked by _dep_check_composite_db._visible(), it appears to dep_zapdeps() that the package is unavailable, and so any choice which pulls in that package will be avoided. Created attachment 196543 [details, diff]
Make emerge mask the first package pulled into the tree in case of a slot conflict and restart the dependency calculation
(In reply to comment #13) > Created an attachment (id=196543) [edit] > Make emerge mask the first package pulled into the tree in case of a slot > conflict and restart the dependency calculation Thanks, that's in svn r13769. I added some additional features: * display message about missed updates * cache frozen_config instance, to optimize performance * disable backtracking if it fails, fall back to a normal This is fixed in 2.2_rc34. Reopening until this is an unmasked release. This is fixed in 2.1.7. |