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

'nix store make-content-addressable' broken on some paths #6300

Closed
edolstra opened this issue Mar 22, 2022 · 0 comments · Fixed by #6302
Closed

'nix store make-content-addressable' broken on some paths #6300

edolstra opened this issue Mar 22, 2022 · 0 comments · Fixed by #6302
Assignees
Labels
bug ca-derivations Derivations with content addressed outputs

Comments

@edolstra
Copy link
Member

edolstra commented Mar 22, 2022

Describe the bug

$ nix store make-content-addressable --store /tmp/nix nixpkgs#coreutils 
rewrote '/nix/store/khkhvvmsfy8ysq3rd3lvanql1w9xp2m4-coreutils-9.0' to '/nix/store/xc941bsj14hc8lm9s86yav64975sivjg-coreutils-9.0'
error: hash mismatch importing path '/nix/store/xc941bsj14hc8lm9s86yav64975sivjg-coreutils-9.0';
         specified: sha256:0clkbi45pidmbggb7bavgfbzpb21ywnzl9i42vdp93ni71ri62da
         got:       sha256:02wfmdrfiskimffm0vy8fv7khr9zfppkqr3gzc1h9k97hqj8c26f

This is probably due to self-references.

@edolstra edolstra added bug ca-derivations Derivations with content addressed outputs labels Mar 22, 2022
@edolstra edolstra self-assigned this Mar 22, 2022
edolstra added a commit to edolstra/nix that referenced this issue Mar 22, 2022
LocalStore::addToStore() since
79ae9e4 expects a regular NAR hash,
rather than a NAR hash modulo self-references. Fixes NixOS#6300.

Also, makeContentAddressed() now rewrites the entire closure (so 'nix
store make-content-addressable' no longer needs '-r'). See NixOS#6301.
edolstra added a commit to edolstra/nix that referenced this issue Mar 24, 2022
LocalStore::addToStore() since
79ae9e4 expects a regular NAR hash,
rather than a NAR hash modulo self-references. Fixes NixOS#6300.

Also, makeContentAddressed() now rewrites the entire closure (so 'nix
store make-content-addressable' no longer needs '-r'). See NixOS#6301.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ca-derivations Derivations with content addressed outputs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant