Revert previous commit

It doesn't detect indirect references
This commit is contained in:
Shea Levy 2011-12-21 17:31:34 +00:00
parent f3c88f297d
commit b4cee3f816

View file

@ -1986,15 +1986,6 @@ void DerivationGoal::computeClosure()
info.deriver = drvPath; info.deriver = drvPath;
infos.push_back(info); infos.push_back(info);
} }
/* Mutually recursive outputs are not allowed */
foreach (ValidPathInfos::iterator, i, infos)
foreach (ValidPathInfos::iterator, j, infos)
if ((i->path != j->path) &&
(i->references.find(j->path) != i->references.end()) &&
(j->references.find(i->path) != j->references.end()))
throw BuildError(format("Mutually referential outputs are not allowed: outputs `%1%' and `%2%' refer to each other") % i->path % j->path);
worker.store.registerValidPaths(infos); worker.store.registerValidPaths(infos);
/* It is now safe to delete the lock files, since all future /* It is now safe to delete the lock files, since all future