aboutsummaryrefslogtreecommitdiff
path: root/nix/nix-daemon/guix-daemon.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-12-05 15:22:28 +0100
committerLudovic Courtès <ludo@gnu.org>2012-12-05 15:22:28 +0100
commit8b15ac6700f1345e9efa709dea6e4efcbdaf6d7a (patch)
treedb3c64a7545a5faefa8f941c9b5d7a87fefa1170 /nix/nix-daemon/guix-daemon.cc
parentd23077dc5ca1517bd6d1600664fe2303b86eb16c (diff)
downloadpatches-8b15ac6700f1345e9efa709dea6e4efcbdaf6d7a.tar
patches-8b15ac6700f1345e9efa709dea6e4efcbdaf6d7a.tar.gz
daemon: Disable use of chroots when support is lacking.
* nix/nix-daemon/guix-daemon.cc (options)[!HAVE_CHROOT]: Mention that `--disable-chroot' has no effect. (main)[!HAVE_CHROOT]: Set `useChroot' to false.
Diffstat (limited to 'nix/nix-daemon/guix-daemon.cc')
-rw-r--r--nix/nix-daemon/guix-daemon.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 43d4113493..7a3b178eab 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -61,7 +61,12 @@ static const struct argp_option options[] =
{ "max-jobs", 'M', "N", 0,
"Allow at most N build jobs" },
{ "disable-chroot", GUIX_OPT_DISABLE_CHROOT, 0, 0,
- "Disable chroot builds" },
+ "Disable chroot builds"
+#ifndef HAVE_CHROOT
+ " (chroots are not supported in this configuration, so "
+ "this option has no effect)"
+#endif
+ },
{ "disable-log-compression", GUIX_OPT_DISABLE_LOG_COMPRESSION, 0, 0,
"Disable compression of the build logs" },
{ 0, 0, 0, 0, 0 }
@@ -105,7 +110,12 @@ main (int argc, char *argv[])
{
Strings nothing;
+#ifdef HAVE_CHROOT
settings.useChroot = true;
+#else
+ settings.useChroot = false;
+#endif
+
settings.processEnvironment ();
argp_parse (&argp, argc, argv, 0, 0, 0);