about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-07-05T20·33+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-07-05T20·33+0000
commit6da6fbfbe940feb807eeef20035d6603448d4d5e (patch)
treef1ec56bac240f6e4ac15e1a79674c403c753a62f /src/nix-env/nix-env.cc
parent6d1a1191b053645fa0277830524bf085a7fe0956 (diff)
* Properly keep packages during upgrades.
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 7733ab16b9ec..9c78f012141a 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