From 6da6fbfbe940feb807eeef20035d6603448d4d5e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 5 Jul 2007 20:33:04 +0000 Subject: [PATCH] * Properly keep packages during upgrades. --- src/nix-env/nix-env.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index 7733ab16b..9c78f0121 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -567,7 +567,10 @@ static void upgradeDerivations(Globals & globals, DrvName drvName(i->name); MetaInfo meta = i->queryMetaInfo(globals.state); - if (meta["keep"] == "true") continue; + if (meta["keep"] == "true") { + newElems.push_back(*i); + continue; + } /* Find the derivation in the input Nix expression with the same name that satisfies the version constraints specified