Skip to content
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: ignore symlinks in fsync-store-paths #12103

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

CertainLach
Copy link
Member

Motivation

When fsync-store-paths is enabled, during nix copy symlink store entries are treated as directory, which is not correct.

Context

Fixes #12099


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Mic92
Copy link
Member

Mic92 commented Dec 25, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Dec 25, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at bff9296

@mergify mergify bot merged commit bff9296 into NixOS:master Dec 25, 2024
13 checks passed
@@ -331,15 +331,16 @@ void syncParent(const Path & path)

void recursiveSync(const Path & path)
{
/* If it's a file, just fsync and return. */
/* If it's a file or symlink, just fsync and return. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this comment is wrong, if I'm reading the code correctly:

If it's a file, fsync and return; if it's a symlink, just return without fsyncing.

@roberth roberth added backport 2.24-maintenance Automatically creates a PR against the branch backport 2.25-maintenance Automatically creates a PR against the branch labels Jan 10, 2025
mergify bot added a commit that referenced this pull request Jan 10, 2025
…2103

fix: ignore symlinks in fsync-store-paths (backport #12103)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.24-maintenance Automatically creates a PR against the branch backport 2.25-maintenance Automatically creates a PR against the branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fsync-store-paths option doesn't work with nix copy
4 participants