From e0afaf18576e8c04110f4ae8499a311cae261215 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 14 Sep 2006 22:48:59 +0000 Subject: [PATCH] * Wow, that bug has been there since r764. --- src/nix-env/profiles.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nix-env/profiles.cc b/src/nix-env/profiles.cc index b99024d07..ab0c4977b 100644 --- a/src/nix-env/profiles.cc +++ b/src/nix-env/profiles.cc @@ -81,8 +81,8 @@ Path createGeneration(Path profile, Path outPath) previous ones. */ int dummy; Generations gens = findGenerations(profile, dummy); - unsigned int num = gens.size() > 0 ? gens.front().number : 0; - + unsigned int num = gens.size() > 0 ? gens.back().number : 0; + /* Create the new generation. Note that addPermRoot() blocks if the garbage collector is running to prevent the stuff we've build from moving from the temporary roots (which the GC knows)