diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-27T22·17+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-27T22·17+0100 |
commit | 3fd01b171a74d28dc8e48b9ee5f2d0e9a3915fb8 (patch) | |
tree | 42620e16ae70c2f98354f7f3bd316b0473f7030e /src/nix-env/profiles.cc | |
parent | c9f6232304558cbdafb14e13e316e539f5bed72e (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/nix-env/profiles.cc')
-rw-r--r-- | src/nix-env/profiles.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nix-env/profiles.cc b/src/nix-env/profiles.cc index c327993594e8..f7b306890d4c 100644 --- a/src/nix-env/profiles.cc +++ b/src/nix-env/profiles.cc @@ -118,8 +118,7 @@ void switchLink(Path link, Path target) if (dirOf(target) == dirOf(link)) target = baseNameOf(target); Path tmp = canonPath(dirOf(link) + "/.new_" + baseNameOf(link)); - if (symlink(target.c_str(), tmp.c_str()) != 0) - throw SysError(format("creating symlink `%1%'") % tmp); + createSymlink(target, tmp); /* The rename() system call is supposed to be essentially atomic on Unix. That is, if we have links `current -> X' and `new_current -> Y', and we rename new_current to current, a |