1 |
commit: 5497c9f1443f1f615f145ee645f17959ed20168c |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 23 05:10:14 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 23 05:10:14 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5497c9f1 |
7 |
|
8 |
Fix success_without_autounmask logic wrt rebuilds |
9 |
|
10 |
--- |
11 |
pym/_emerge/depgraph.py | 34 ++++++++++++++++++++-------------- |
12 |
1 files changed, 20 insertions(+), 14 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
15 |
index 039dbdc..75e3500 100644 |
16 |
--- a/pym/_emerge/depgraph.py |
17 |
+++ b/pym/_emerge/depgraph.py |
18 |
@@ -2658,20 +2658,6 @@ class depgraph(object): |
19 |
"slot conflict" in self._dynamic_config._backtrack_infos): |
20 |
return False, myfavorites |
21 |
|
22 |
- digraph_nodes = self._dynamic_config.digraph.nodes |
23 |
- |
24 |
- if any(x in digraph_nodes for x in |
25 |
- self._dynamic_config._needed_unstable_keywords) or \ |
26 |
- any(x in digraph_nodes for x in |
27 |
- self._dynamic_config._needed_p_mask_changes) or \ |
28 |
- any(x in digraph_nodes for x in |
29 |
- self._dynamic_config._needed_use_config_changes) or \ |
30 |
- any(x in digraph_nodes for x in |
31 |
- self._dynamic_config._needed_license_changes) : |
32 |
- #We failed if the user needs to change the configuration |
33 |
- self._dynamic_config._success_without_autounmask = True |
34 |
- return False, myfavorites |
35 |
- |
36 |
if self._rebuild.trigger_rebuilds(): |
37 |
backtrack_infos = self._dynamic_config._backtrack_infos |
38 |
config = backtrack_infos.setdefault("config", {}) |
39 |
@@ -2686,6 +2672,26 @@ class depgraph(object): |
40 |
self.need_restart(): |
41 |
return False, myfavorites |
42 |
|
43 |
+ # Any failures except those due to autounmask *alone* should return |
44 |
+ # before this point, since the success_without_autounmask flag that's |
45 |
+ # set below is reserved for cases where there are *zero* other |
46 |
+ # problems. For reference, see backtrack_depgraph, where it skips the |
47 |
+ # get_best_run() call when success_without_autounmask is True. |
48 |
+ |
49 |
+ digraph_nodes = self._dynamic_config.digraph.nodes |
50 |
+ |
51 |
+ if any(x in digraph_nodes for x in |
52 |
+ self._dynamic_config._needed_unstable_keywords) or \ |
53 |
+ any(x in digraph_nodes for x in |
54 |
+ self._dynamic_config._needed_p_mask_changes) or \ |
55 |
+ any(x in digraph_nodes for x in |
56 |
+ self._dynamic_config._needed_use_config_changes) or \ |
57 |
+ any(x in digraph_nodes for x in |
58 |
+ self._dynamic_config._needed_license_changes) : |
59 |
+ #We failed if the user needs to change the configuration |
60 |
+ self._dynamic_config._success_without_autounmask = True |
61 |
+ return False, myfavorites |
62 |
+ |
63 |
# We're true here unless we are missing binaries. |
64 |
return (True, myfavorites) |