From 9f9080e2c019f188ba679a7a89284d7eaf629710 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 May 2014 17:19:36 +0200 Subject: nix-store -l: Fetch build logs from the Internet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a build log is not available locally, then ‘nix-store -l’ will now try to download it from the servers listed in the ‘log-servers’ option in nix.conf. For instance, if you have: log-servers = http://hydra.nixos.org/log then it will try to get logs from http://hydra.nixos.org/log/. So you can do things like: $ nix-store -l $(which xterm) and get a log even if xterm wasn't built locally. --- src/libutil/util.cc | 2 +- src/libutil/util.hh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libutil') diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 846674a29d..8fc78b1463 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -901,7 +901,7 @@ string runProgram(Path program, bool searchPath, const Strings & args) /* Wait for the child to finish. */ int status = pid.wait(true); if (!statusOk(status)) - throw Error(format("program `%1%' %2%") + throw ExecError(format("program `%1%' %2%") % program % statusToString(status)); return result; diff --git a/src/libutil/util.hh b/src/libutil/util.hh index ce2d77c19a..1e9ffcf51b 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -257,6 +257,8 @@ void killUser(uid_t uid); string runProgram(Path program, bool searchPath = false, const Strings & args = Strings()); +MakeError(ExecError, Error) + /* Close all file descriptors except stdin, stdout, stderr, and those listed in the given set. Good practice in child processes. */ void closeMostFDs(const set & exceptions); -- cgit 1.4.1