You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This only happens when you refer to the packages by file system path, even if directly given the nix store path. It works as expected and prints the appropriate error message when referred to by flake attribute path.
Steps To Reproduce
Create the following flake.
Run nix profile install --profile ./profile ./a ./b using Nix 2.15.
Expected behavior
❯ nix profile install --profile ./profile ./a ./b
error: An existing package already provides the following file:
/nix/store/s5z281h1xn24wzfwmdr6699lbdc4xbdi-foo-a/foo
This is the conflicting file from the new package:
/nix/store/7dlry4dhs100izx3mdjvbvmzq7mkdfgj-foo-b/foo
To remove the existing package:
nix profile remove path:/home/dermetfan/x
The new package can also be installed next to the existing one by assigning a different priority.
The conflicting packages have a priority of 5.
To prioritise the new package:
nix profile install path:/home/dermetfan/x --priority 4
To prioritise the existing package:
nix profile install path:/home/dermetfan/x --priority 6
nix-env --version output
❯ nix run github:nixos/nix/2.15-maintenance -- --version
nix (Nix) 2.15.1
Additional context
This is a regression in 2.15:
❯ nix run github:nixos/nix/2.14-maintenance -- profile install --profile ./profile .#a .#b
error: files '/nix/store/s5z281h1xn24wzfwmdr6699lbdc4xbdi-foo-a/foo' and '/nix/store/7dlry4dhs100izx3mdjvbvmzq7mkdfgj-foo-b/foo' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' or type 'nix profile install --help' if using 'nix profile' to find out how to change the priority of one of the conflicting packages (0 being the highest priority)
❯ nix run github:nixos/nix/2.15-maintenance -- profile install --profile ./profile ./a ./b
fish: Job 2, 'command nix $argv' terminated by signal SIGSEGV (Address boundary error)
The text was updated successfully, but these errors were encountered:
- If the element comes from a flake, print the full flakeref (with the
fragment part) and not just the reference to the flake itself
- If the element doesn't come from a flake, print its store path(s)
This is a bit too verbose, but has the advantages of being correct (and
not crashing), so it's strictly better than the previous situation
FixNixOS#8284
Describe the bug
Nix 2.15 segfaults when one tries to install two conflicting packages into a profile:
This only happens when you refer to the packages by file system path, even if directly given the nix store path. It works as expected and prints the appropriate error message when referred to by flake attribute path.
Steps To Reproduce
nix profile install --profile ./profile ./a ./b
using Nix 2.15.Expected behavior
nix-env --version
outputAdditional context
This is a regression in 2.15:
The text was updated successfully, but these errors were encountered: