From f986a44980742ce74b6fd3321696f6b4937f696b Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Wed, 29 Nov 2017 11:36:28 +0000 Subject: [PATCH] Fix "Unexpected EOF reading a line" error propagated-user-env-packages files in nixpkgs aren't all terminated by newlines, as buildenv expected. Now it does not require a terminating newline; note that this introduces a behaviour change: propagated user env packages may now be spread across multiple lines. However, nix 1.11.x still expects them to be on a single line so this shouldn't be used in nixpkgs for now. --- src/buildenv/buildenv.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buildenv/buildenv.cc b/src/buildenv/buildenv.cc index f05aa7bf2..eddb9fdaa 100644 --- a/src/buildenv/buildenv.cc +++ b/src/buildenv/buildenv.cc @@ -115,9 +115,9 @@ static void addPkg(const Path & pkgDir, int priority) return; throw SysError(format("opening '%1%'") % propagatedFN); } - propagated = readLine(fd.get()); + propagated = readFile(fd.get()); } - for (const auto & p : tokenizeString>(propagated, " ")) + for (const auto & p : tokenizeString>(propagated, " \n")) if (done.find(p) == done.end()) postponed.insert(p); }