1
0
Fork 0
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:
Eelco Dolstra 2006-12-02 16:41:36 +00:00
parent 30bf547f4f
commit e25fad691a
11 changed files with 81 additions and 17 deletions

View file

@ -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);