From e25fad691aa3ccb492c4fb8840289f76151e553e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 2 Dec 2006 16:41:36 +0000 Subject: * 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. --- src/nix-env/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nix-env/main.cc') diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 4f0b5eca9024..f2988485cdfd 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -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); -- cgit 1.4.1