mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
* Move addTempRoot() to the store API, and add another function
syncWithGC() to allow clients to register GC roots without needing write access to the global roots directory or the GC lock.
This commit is contained in:
parent
30bf547f4f
commit
e25fad691a
11 changed files with 81 additions and 17 deletions
|
@ -182,7 +182,7 @@ static void createUserEnv(EvalState & state, const DrvInfos & elems,
|
|||
|
||||
/* This is only necessary when installing store paths, e.g.,
|
||||
`nix-env -i /nix/store/abcd...-foo'. */
|
||||
addTempRoot(i->queryOutPath(state));
|
||||
store->addTempRoot(i->queryOutPath(state));
|
||||
store->ensurePath(i->queryOutPath(state));
|
||||
|
||||
references.insert(i->queryOutPath(state));
|
||||
|
@ -940,7 +940,7 @@ static void opSwitchProfile(Globals & globals,
|
|||
if (opArgs.size() != 1)
|
||||
throw UsageError(format("exactly one argument expected"));
|
||||
|
||||
Path profile = opArgs.front();
|
||||
Path profile = absPath(opArgs.front());
|
||||
Path profileLink = getHomeDir() + "/.nix-profile";
|
||||
|
||||
switchLink(profileLink, profile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue