New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build --repeat with -K to use real paths #2687
Conversation
I marked this as stale due to inactivity. → More info |
Use toRealPath() to map store paths correctly for builds with the --keep-failed (-K) and --repeat options. This fixes an issue where the rename of a build output with a .check suffix fails due to having the wrong store paths. Added test of build --repeat with --keep-failed to demonstrate issue and prevent regressions.
ee6e736
to
86173c6
Compare
I believe this bug still exists and I have updated the pull request accordingly. While most users are unlikely to encounter the issue, it seems potentially serious as there is an attempt to delete and rename files at the wrong locations. cc: @domenkozar @edolstra |
|
Thanks for following-up. Your example works. The issue surfaces in the environment of tests/linux-sandbox.sh. There, a sandbox/chroot is forced by setting an absolute path in NIX_REMOTE. So, if you create a temporary directory /tmp/my_remote_store and run your example with the NIX_REMOTE environment variable set you should hopefully reproduce the issue, e.g.: $ mkdir /tmp/my_remote_store |
I marked this as stale due to inactivity. → More info |
In #7099 |
I guess no, let's close. Feel free to reopen if there's a need |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-01-20-nix-team-meeting-minutes-25/25432/1 |
Use toRealPath() to map store paths correctly for builds with the
--keep-failed (-K) and --repeat options. This fixes an issue where
the rename of a build output with a .check suffix fails due to
having the wrong store paths.
Added test of build --repeat with --keep-failed to demonstrate
issue and prevent regressions.
Fixes #4617