summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2009-06-06 11:36:13 -0700
committerDaniel Burrows <dburrows@debian.org>2009-06-06 11:36:13 -0700
commit6b06f1acabb03c29dbc0b9ef1f65b02763072cf7 (patch)
tree5a059b7827d042d3ca5a2631b6e7dd1a08316584
parent2eff952ad1d63ff4a466af0b6e9559c6a7cc6dab (diff)
downloadaptitude-6b06f1acabb03c29dbc0b9ef1f65b02763072cf7.tar.gz
Ensure that the first time we add a successor to a step, we do not update the "is_last_child" member of the last step in the steps list.
This may be a symptom of the fact that the way steps are added is rather error-prone. However, it should work now. The problem was that we were always clearing the "is_last_child" member of the last step in the global list of steps. We want to do this whenever we add a child beyond the first, since otherwise each step would have only one child. But we don't want to do it for the first child, or only the very last step in the list would be marked as a last child (meaning that every "child" list would contain all the steps following its first entry).
-rw-r--r--src/generic/problemresolver/problemresolver.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/generic/problemresolver/problemresolver.h b/src/generic/problemresolver/problemresolver.h
index 277fb742..c5cd544e 100644
--- a/src/generic/problemresolver/problemresolver.h
+++ b/src/generic/problemresolver/problemresolver.h
@@ -2831,7 +2831,7 @@ private:
bool &_first)
: parent_step_num(_parent_step_num), resolver(_resolver), first(_first)
{
- first = false;
+ first = true;
}
bool operator()(const std::pair<choice, typename step::solver_information> &solver_pair) const