From 2708b37ce51aa732f0e9e09c736b1f133291267d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 13 Oct 2010 20:57:50 -0400 Subject: [PATCH] Bug - Fixed GC bug that attempted to clean up dangling dependencies but actually failed to update the tasks. --- src/TDB.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/TDB.cpp b/src/TDB.cpp index 3545392ac..39d7d0c30 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -612,9 +612,6 @@ int TDB::gc () std::vector ignore; loadPending (ignore, filter); - // TODO This whole idea of removing dangling dependencies is suspect. I'm not - // sure it should be included. - // Search for dangling dependencies. These are dependencies whose uuid cannot // be converted to an id by TDB. std::vector deps; @@ -625,14 +622,17 @@ int TDB::gc () deps.clear (); task->getDependencies (deps); foreach (dep, deps) + { if (id (*dep) == 0) { task->removeDependency (*dep); + ++count_pending_changes; context.debug ("GC: Removed dangling dependency " - + *dep - + " from " - + task->get ("uuid")); + + task->get ("uuid") + + " -> " + + *dep); } + } } }