diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-08-25 20:33:01 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2018-08-25 20:50:44 +0200 |
commit | d85bb4814f4fa2ed6046bba6e8c6394adf9e5666 (patch) | |
tree | c53143d3bdc1bce363821fd5b3d15e66dcf10af0 /src/nix/legacy.hh | |
parent | 414397759a5390b54cee12c6834e6106bea12f5f (diff) |
upgrade-nix: resolve profile symlinks
The profile present in PATH is not necessarily the actual profile
location. User profiles are generally added as $HOME/.nix-profile
in which case the indirect profile link needs to be resolved first.
/home/user/.nix-profile -> /nix/var/nix/profiles/per-user/user/profile
/nix/var/nix/profiles/per-user/user/profile -> profile-15-link
/nix/var/nix/profiles/per-user/user/profile-14-link -> /nix/store/hyi4kkjh3bwi2z3wfljrkfymz9904h62-user-environment
/nix/var/nix/profiles/per-user/user/profile-15-link -> /nix/store/6njpl3qvihz46vj911pwx7hfcvwhifl9-user-environment
To upgrade nix here we want /nix/var/nix/profiles/per-user/user/profile-16-link
instead of /home/user/.nix-profile-1-link. The latter is not a gcroot
and would be garbage collected, resulting in a broken profile.
Fixes #2175
Diffstat (limited to 'src/nix/legacy.hh')
0 files changed, 0 insertions, 0 deletions