about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01T20·43-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01T21·17-0400
commitca94b383718f2dc5f4f14ed6eddd8d04ac9d3fc2 (patch)
tree2b0e0d9586f08e98004a7f714cd1fddc9033c998 /src
parent46f852cda013b818f113c7905f020131a44f2340 (diff)
nix-env: Ignore manifest.nix when recursing into ~/.nix-defexpr
Channels are implemented using a profile now, and profiles contain a
manifest.nix file.  This should be ignored to prevent bogus packages
from showing up in nix-env.
Diffstat (limited to 'src')
-rw-r--r--src/nix-env/nix-env.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 475bdd3669b0..5174daf90d86 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -112,6 +112,11 @@ static void getAllExprs(EvalState & state,
     StringSet namesSorted(names.begin(), names.end());
 
     foreach (StringSet::iterator, i, namesSorted) {
+        /* Ignore the manifest.nix used by profiles.  This is
+           necessary to prevent it from showing up in channels (which
+           are implemented using profiles). */
+        if (*i == "manifest.nix") continue;
+        
         Path path2 = path + "/" + *i;
         
         struct stat st;