OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "update_engine/cycle_breaker.h" | 5 #include "update_engine/cycle_breaker.h" |
6 #include <set> | 6 #include <set> |
7 #include <utility> | 7 #include <utility> |
8 #include "update_engine/graph_utils.h" | 8 #include "update_engine/graph_utils.h" |
9 #include "update_engine/tarjan.h" | 9 #include "update_engine/tarjan.h" |
10 #include "update_engine/utils.h" | 10 #include "update_engine/utils.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 found = true; | 126 found = true; |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 if (found) { | 130 if (found) { |
131 Unblock(vertex); | 131 Unblock(vertex); |
132 } else { | 132 } else { |
133 for (Vertex::SubgraphEdgeMap::iterator w = | 133 for (Vertex::SubgraphEdgeMap::iterator w = |
134 subgraph_[vertex].subgraph_edges.begin(); | 134 subgraph_[vertex].subgraph_edges.begin(); |
135 w != subgraph_[vertex].subgraph_edges.end(); ++w) { | 135 w != subgraph_[vertex].subgraph_edges.end(); ++w) { |
136 subgraph_[*w].subgraph_edges.insert(vertex); | 136 if (blocked_graph_[*w].out_edges.find(vertex) == |
| 137 blocked_graph_[*w].out_edges.end()) { |
| 138 blocked_graph_[*w].out_edges.insert(make_pair(vertex, |
| 139 EdgeProperties())); |
| 140 } |
137 } | 141 } |
138 } | 142 } |
139 CHECK_EQ(vertex, stack_.back()); | 143 CHECK_EQ(vertex, stack_.back()); |
140 stack_.pop_back(); | 144 stack_.pop_back(); |
141 return found; | 145 return found; |
142 } | 146 } |
143 | 147 |
144 } // namespace chromeos_update_engine | 148 } // namespace chromeos_update_engine |
OLD | NEW |