From dfa2f77d2e1118f32771c2fceefd683435554b9d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Apr 2014 19:24:29 +0200 Subject: If a .drv cannot be parsed, show its path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful. --- src/libstore/local-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/local-store.cc') diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 1293a6e8f260..567706d09748 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -661,7 +661,7 @@ unsigned long long LocalStore::addValidPath(const ValidPathInfo & info, bool che efficiently query whether a path is an output of some derivation. */ if (isDerivation(info.path)) { - Derivation drv = parseDerivation(readFile(info.path)); + Derivation drv = readDerivation(info.path); /* Verify that the output paths in the derivation are correct (i.e., follow the scheme for computing output paths from @@ -1290,7 +1290,7 @@ void LocalStore::registerValidPaths(const ValidPathInfos & infos) if (isDerivation(i->path)) { // FIXME: inefficient; we already loaded the // derivation in addValidPath(). - Derivation drv = parseDerivation(readFile(i->path)); + Derivation drv = readDerivation(i->path); checkDerivationOutputs(i->path, drv); } -- cgit 1.4.1