From 4f5ed95bb94a47a0d8849b783e01a0f9597ee2da Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 1 Jun 2010 11:20:05 +0000 Subject: [PATCH] * For ease of use during debugging, don't require --gc-roots-dir. --- src/c/hydra_eval_jobs.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/c/hydra_eval_jobs.cc b/src/c/hydra_eval_jobs.cc index bffbab44..0f493849 100644 --- a/src/c/hydra_eval_jobs.cc +++ b/src/c/hydra_eval_jobs.cc @@ -151,8 +151,10 @@ static void findJobsWrapped(EvalState & state, XMLWriter & doc, /* Register the derivation as a GC root. !!! This registers roots for jobs that we may have already done. */ - Path root = gcRootsDir + "/" + baseNameOf(drvPath); - if (!pathExists(root)) addPermRoot(drvPath, root, false); + if (gcRootsDir != "") { + Path root = gcRootsDir + "/" + baseNameOf(drvPath); + if (!pathExists(root)) addPermRoot(drvPath, root, false); + } XMLOpenElement _(doc, "job", xmlAttrs); showArgsUsed(doc, argsUsed); @@ -229,7 +231,7 @@ void run(Strings args) if (releaseExpr == "") throw UsageError("no expression specified"); - if (gcRootsDir == "") throw UsageError("--gc-roots-dir not specified"); + if (gcRootsDir == "") printMsg(lvlError, "warning: `--gc-roots-dir' not specified"); store = openStore();