about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-27T22·17+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-27T22·17+0100
commit3fd01b171a74d28dc8e48b9ee5f2d0e9a3915fb8 (patch)
tree42620e16ae70c2f98354f7f3bd316b0473f7030e /src/libstore/local-store.cc
parentc9f6232304558cbdafb14e13e316e539f5bed72e (diff)
Set up a minimal /dev in chroots
Not bind-mounting the /dev from the host also solves the problem with
/dev/shm being a symlink to something not in the chroot.
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index aca98412ae..1293a6e8f2 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -243,8 +243,7 @@ LocalStore::LocalStore(bool reserveSpace)
     Path gcRootsDir = settings.nixStateDir + "/gcroots";
     if (!pathExists(gcRootsDir)) {
         createDirs(gcRootsDir);
-        if (symlink(profilesDir.c_str(), (gcRootsDir + "/profiles").c_str()) == -1)
-            throw SysError(format("creating symlink to `%1%'") % profilesDir);
+        createSymlink(profilesDir, gcRootsDir + "/profiles");
     }
 
     checkStoreNotSymlink();