Revert "builtins.readFile: Put the references of the file, not those needed to realize the file, into the context"

Reverting commit 451c223dee for now
because it breaks http://hydra.nixos.org/build/46805136, not clear
why.
This commit is contained in:
Eelco Dolstra 2017-01-24 15:29:46 +01:00
parent 4b6d3c5a28
commit fa738e50bc
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -779,9 +779,6 @@ static void prim_readFile(EvalState & state, const Pos & pos, Value * * args, Va
string s = readFile(state.checkSourcePath(path));
if (s.find((char) 0) != string::npos)
throw Error(format("the contents of the file %1% cannot be represented as a Nix string") % path);
context = state.store->isInStore(path) ?
state.store->queryPathInfo(state.store->toStorePath(path))->references :
PathSet{};
mkString(v, s.c_str(), context);
}