From 89a8207029e7f6d5cfe3ab972c49ea46f5b9a784 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 31 Jul 2012 17:56:02 -0400 Subject: [PATCH] =?UTF-8?q?Add=20an=20option=20=E2=80=98build-fallback?= =?UTF-8?q?=E2=80=99=20(equivalent=20to=20the=20--fallback=20flag)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/manual/conf-file.xml | 10 ++++++++++ src/libmain/shared.cc | 2 +- src/libstore/globals.cc | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/manual/conf-file.xml b/doc/manual/conf-file.xml index c73466ef5c..c19e44ebf6 100644 --- a/doc/manual/conf-file.xml +++ b/doc/manual/conf-file.xml @@ -246,6 +246,16 @@ flag, e.g. --option gc-keep-outputs false. + build-fallback + + If set to true, Nix will fall + back to building from source if a binary substitute fails. This + is equivalent to the flag. The + default is false. + + + + build-chroot-dirs When builds are performed in a chroot environment, diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 9c62e320f6..e1280911b3 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -191,7 +191,7 @@ static void initAndRun(int argc, char * * argv) else if (arg == "--keep-going" || arg == "-k") settings.keepGoing = true; else if (arg == "--fallback") - settings.tryFallback = true; + settings.set("build-fallback", "true"); else if (arg == "--max-jobs" || arg == "-j") settings.set("build-max-jobs", getArg(arg, i, args.end())); else if (arg == "--cores") diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 7dc2e714bc..f5f4f15f01 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -118,9 +118,10 @@ void Settings::set(const string & name, const string & value) void Settings::update() { - get(thisSystem, "system"); + get(tryFallback, "build-fallback"); get(maxBuildJobs, "build-max-jobs"); get(buildCores, "build-cores"); + get(thisSystem, "system"); get(maxSilentTime, "build-max-silent-time"); get(buildTimeout, "build-timeout"); get(reservedSize, "gc-reserved-space");