diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-11-29T16·18+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-11-29T16·18+0000 |
commit | 633518628f48fb9c06bfd570eeca6f62696aba05 (patch) | |
tree | 33313707305a011265e30d4670264a9b7979d298 /tests | |
parent | 12d0a1eb753567bb2083aadb4ee3d325d3f29c70 (diff) |
* nix-env -e: support uninstalling by path, so that one can say
$ nix-env -e $(which firefox) or $ nix-env -e /nix/store/nywzlygrkfcgz7dfmhm5xixlx1l0m60v-pan-0.132 * nix-env -i: if an argument contains a slash anywhere, treat it as a path and follow it through symlinks into the Nix store. This allows things like $ nix-build -A firefox $ nix-env -i ./result * nix-env -q/-i/-e: don't complain when the `*' selector doesn't match anything. In particular, `nix-env -q \*' doesn't fail anymore on an empty profile.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/user-envs.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/user-envs.sh b/tests/user-envs.sh index 614c30ceb34d..edb6da0bfcb2 100644 --- a/tests/user-envs.sh +++ b/tests/user-envs.sh @@ -2,6 +2,8 @@ source common.sh clearProfiles +set -x + # Query installed: should be empty. test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 0 @@ -71,6 +73,15 @@ echo $outPath10 $nixenv -p $profiles/test -i "$outPath10" $nixenv -p $profiles/test -q '*' | grep -q foo-1.0 +# Uninstall foo-1.0, using a symlink to its store path. +ln -sfn $outPath10/bin/foo $TEST_ROOT/symlink +$nixenv -p $profiles/test -e $TEST_ROOT/symlink +if $nixenv -p $profiles/test -q '*' | grep -q foo; then false; fi + +# Install foo-1.0, now using a symlink to its store path. +$nixenv -p $profiles/test -i $TEST_ROOT/symlink +$nixenv -p $profiles/test -q '*' | grep -q foo + # Delete all old generations. $nixenv -p $profiles/test --delete-generations old |