1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 19:23:54 +02:00

Mis-read Eelko's request to not make this an option: now, let's not make

it an option. :)
This commit is contained in:
Christian Theune 2015-05-20 17:29:52 +02:00
parent ea39c98d41
commit 12a888894b
6 changed files with 16 additions and 30 deletions

View file

@ -99,25 +99,16 @@ if nix-env -q '*' | grep -q bar; then false; fi
nix-env --list-generations
test "$(nix-env --list-generations | wc -l)" -eq 7
# Doing the same operation twice results in the same generation, but creates an
# additional one. At this point we just brought back foo.
# Doing the same operation twice results in the same generation, which triggers
# "lazy" behaviour and does not create a new symlink.
nix-env -i foo
nix-env -i foo
# Count generations.
nix-env --list-generations
test "$(nix-env --list-generations | wc -l)" -eq 8
# Now, doing that again but passing the --lazy-generations flag will not
# create a new generation.
nix-env -i foo --lazy-generation
# Count generations.
nix-env --list-generations
test "$(nix-env --list-generations | wc -l)" -eq 8
# Switch to a specified generation.
nix-env --switch-generation 7
[ "$(nix-store -q --resolve $profiles/test)" = "$oldGen" ]