* toFile: maintain the references.
This commit is contained in:
parent
b3d3700e11
commit
9bd93f7606
1 changed files with 4 additions and 10 deletions
|
@ -370,17 +370,11 @@ static Expr primToFile(EvalState & state, const ATermVector & args)
|
||||||
|
|
||||||
PathSet refs;
|
PathSet refs;
|
||||||
|
|
||||||
#if 0
|
for (PathSet::iterator i = context.begin(); i != context.end(); ++i) {
|
||||||
/* !!! */
|
if (isDerivation(*i))
|
||||||
for (ATermIterator i(context); i; ++i) {
|
throw EvalError("in `toFile': the file cannot refer to derivation outputs");
|
||||||
ATerm s;
|
refs.insert(*i);
|
||||||
if (matchPath(*i, s)) {
|
|
||||||
assert(isStorePath(aterm2String(s)));
|
|
||||||
refs.insert(aterm2String(s));
|
|
||||||
}
|
}
|
||||||
else throw EvalError("in `toFile': the file cannot contain references to derivation outputs");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Path storePath = addTextToStore(name, contents, refs);
|
Path storePath = addTextToStore(name, contents, refs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue