Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 279549 Details for
Bug 374397
portage goes into endless loop when trying to emerge some packages
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
output circular dependency debug graph earlier
circ_debug.patch (text/plain), 2.99 KB, created by
Zac Medico
on 2011-07-09 22:59:12 UTC
(
hide
)
Description:
output circular dependency debug graph earlier
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2011-07-09 22:59:12 UTC
Size:
2.99 KB
patch
obsolete
>diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py >index 899d04e..64ed50e 100644 >--- a/pym/_emerge/depgraph.py >+++ b/pym/_emerge/depgraph.py >@@ -5497,8 +5497,7 @@ class depgraph(object): > noiselevel=-1) > portage.writemsg("\n", noiselevel=-1) > >- if handler.circular_dep_message is None or \ >- "--debug" in self._frozen_config.myopts: >+ if handler.circular_dep_message is None: > handler.debug_print() > portage.writemsg("\n", noiselevel=-1) > >diff --git a/pym/_emerge/resolver/circular_dependency.py b/pym/_emerge/resolver/circular_dependency.py >index 1789801..994e202 100644 >--- a/pym/_emerge/resolver/circular_dependency.py >+++ b/pym/_emerge/resolver/circular_dependency.py >@@ -3,11 +3,13 @@ > > from __future__ import print_function > >-from itertools import chain >+from itertools import chain, product >+import logging > > from portage.dep import use_reduce, extract_affecting_use, check_required_use, get_required_use_flags > from portage.exception import InvalidDependString > from portage.output import colorize >+from portage.util import writemsg_level > from _emerge.DepPrioritySatisfiedRange import DepPrioritySatisfiedRange > > class circular_dependency_handler(object): >@@ -17,6 +19,14 @@ class circular_dependency_handler(object): > self.graph = graph > self.all_parent_atoms = depgraph._dynamic_config._parent_atoms > >+ if "--debug" in depgraph._frozen_config.myopts: >+ # Show this debug output before doing the calculations >+ # that follow, so at least we have this debug info >+ # if we happen to hit a bug later. >+ writemsg_level("\n\ncircular dependency graph:\n\n", >+ level=logging.DEBUG, noiselevel=-1) >+ self.debug_print() >+ > self.cycles, self.shortest_cycle = self._find_cycles() > #Guess if it is a large cluster of cycles. This usually requires > #a global USE change. >@@ -147,27 +157,9 @@ class circular_dependency_handler(object): > #We iterate over all possible settings of these use flags and gather > #a set of possible changes > #TODO: Use the information encoded in REQUIRED_USE >- use_state = [] >- for flag in affecting_use: >- use_state.append("disabled") >- >- def _next_use_state(state, id=None): >- if id is None: >- id = len(state)-1 >- >- if id == 0 and state[0] == "enabled": >- return False >- >- if state[id] == "disabled": >- state[id] = "enabled" >- for i in range(id+1,len(state)): >- state[i] = "disabled" >- return True >- else: >- return _next_use_state(state, id-1) >- > solutions = set() >- while(True): >+ for use_state in product(("disabled", "enabled"), >+ repeat=len(affecting_use)): > current_use = set(self.depgraph._pkg_use_enabled(parent)) > for flag, state in zip(affecting_use, use_state): > if state == "enabled": >@@ -200,9 +192,6 @@ class circular_dependency_handler(object): > solution.add((flag, False)) > solutions.add(frozenset(solution)) > >- if not _next_use_state(use_state): >- break >- > for solution in solutions: > ignore_solution = False > for other_solution in solutions:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 374397
:
279539
| 279549 |
279551
|
279557