about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-02-01T09·23+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-02-01T09·23+0000
commit06b44242860d62e12f9abe018c6f974ceaa30bb9 (patch)
tree20a13dc912ca34f70eeb13276ab1dc6a45395615 /src/libstore/build.cc
parent32fa82a56a2c4a937c91f72be16339b4ddf7cdf1 (diff)
* Add missing files to dist.
* Fix GC and substitute bugs related to self-references.  Add a
  regression test.

Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index dbfde447e48b..881f2dac8899 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1329,7 +1329,8 @@ void SubstitutionGoal::init()
 
     for (PathSet::iterator i = references.begin();
          i != references.end(); ++i)
-        addWaitee(worker.makeSubstitutionGoal(*i));
+        if (*i != storePath) /* ignore self-references */
+            addWaitee(worker.makeSubstitutionGoal(*i));
 
     if (waitees.empty()) /* to prevent hang (no wake-up event) */
         referencesValid();
@@ -1347,7 +1348,8 @@ void SubstitutionGoal::referencesValid()
 
     for (PathSet::iterator i = references.begin();
          i != references.end(); ++i)
-        assert(isValidPath(*i));
+        if (*i != storePath) /* ignore self-references */
+            assert(isValidPath(*i));
     
     tryNext();
 }