Repository navigation
Conversation
This patch fixes NixOS#16614. The issue was caused by the fact that both `/share` and `/share/fish/vendor_completions.d` end in the `pathsToLink`. The `pkgs/build-support/buildenv/builder.pl` creates `/share`, then links `/share/fish` under `/share` and then tries to create the directory `/share/fish/vendor_completions.d` and fails because it already exists. The simplest way to reproduce the issue is to build the next Nix expression: ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.fish pkgs.vim ]; pathsToLink = [ "/share" "/share/fish/vendor_completions.d" ]; } ``` This patch makes buildEnv check if directory already exists before trying to create it.
|
@rasendubi, thanks for your PR! By analyzing the annotation information on this pull request, we identified @edolstra, @aszlig and @abbradar to be potential reviewers |
3 of 7 tasks
Member
|
Beautiful, thanks. With your patch applied the example builds, 👍 |
Member
Author
|
Please, wait before merging this. Seems that I found a better patch that fixes both this issue and #16741. |
Member
Author
|
Superseded by #16828. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Things done
(nix.useChroot on NixOS,
or option
build-use-chrootinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)This patch fixes #16614.
The issue was caused by the fact that both
/shareand/share/fish/vendor_completions.dend in thepathsToLink. Thepkgs/build-support/buildenv/builder.plcreates/share, then links/share/fishunder/shareand then tries to create the directory/share/fish/vendor_completions.dand fails because it already exists.The simplest way to reproduce the issue is to build the next Nix
expression:
This patch makes buildEnv check if directory already exists before
trying to create it.