nixos-install: copy channels before system eval#153620
nixos-install: copy channels before system eval#153620roberth merged 1 commit intoNixOS:masterfrom pennae:fix-installer-tests
Conversation
since fc614c3 nixos needs access to its own path (<nixpkgs/nixos>) to evaluate a system with documentation. since documentation is enabled by default almost all systems need such access, including the installer tests. nixos-install however does not ensure that a channel exists in the target store before evaluating the system in that store, which can lead to `path is not valid` errors.
|
How was this working before? Or why did it not require access to that path? |
|
not entirely sure why it worked, but guessing that previously libstore wasn't involved in handling paths. prior to the doc split all nixpkgs did was |
|
It seems that |
roberth
left a comment
There was a problem hiding this comment.
Fairly minor change. nix-env -p is a reasonably simple command, so I don't expect any issues from running it earlier and the commands that now run after it either need it (nix-build) or don't interact with it (nix-env -p on another profile).
An external change is only observable when the build fails and the caller ignores the exit status, which is the obvious way to detect a failed install. We don't make any claims about the state of the system in such a case.
since fc614c3 nixos needs access to its
own path (<nixpkgs/nixos>) to evaluate a system with documentation.
since documentation is enabled by default almost all systems need such
access, including the installer tests. nixos-install however does not
ensure that a channel exists in the target store before evaluating the
system in that store, which can lead to
path is not validerrors.not sure this is the correct fix for the problem, but it does fix the problem.
cc @ajs124