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

error creating statement 'insert or replace into realisations" broke nix installation on update #241

Closed
codygman opened this issue Apr 12, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@codygman
Copy link
Contributor

codygman commented Apr 12, 2021

Upgraded things on Friday, ran into this issue, and filed NixOS/nix#4705.

A recent comment said it was related to ca-derivations, I went and ripgrep'd devos and saw it was enabled now.

Thought it would be good to create an issue here in case others run into it.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@codygman codygman added the bug Something isn't working label Apr 12, 2021
@nrdxp
Copy link
Collaborator

nrdxp commented Apr 12, 2021

Yeah we should probably just disable ca-derivations for now, I think I got a little too excited when I enabled it 😆

@codygman
Copy link
Contributor Author

Locally for now I'm just removing ca-derivations and guessing that won't break anything, but I'm not sure. We'll see since this machine can't be updated right now anyway 😜

@codygman
Copy link
Contributor Author

Huh, it didn't like that lol:

error (ignored): error: cannot unlink '/nix/store/trash/mw3sn78f15rkzs17aa17kqqxnq71jhl3-emacs-gcc-20210407.0.drv.chroot/nix/store/3l6sdyzgn1hylmlgmrvnj1kcnz4plra2-emacs-gcc-20210407.0/share/emacs/28.0.50/lisp': Directory not empty
error: builder for '/nix/store/mw3sn78f15rkzs17aa17kqqxnq71jhl3-emacs-gcc-20210407.0.drv' failed with exit code 2;
       last 10 log lines:
       > gzip: ./windmove.el: No such file or directory
       > gzip: ./font-lock.el: No such file or directory
       > gzip: ./frame.el: No such file or directory
       > gzip: ./pixel-scroll.el: No such file or directory
       > gzip: ./proced.el: No such file or directory
       > gzip: ../etc/publicsuffix.txt: No such file or directory
       > make: *** [Makefile:581: install-arch-indep] Error 1
       > /nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: line 95: /dev/null: No such file or directory
       > /nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: line 76: /dev/null: No such file or directory
       > /nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: line 78: /dev/null: No such file or directory
       For full logs, run 'nix log /nix/store/mw3sn78f15rkzs17aa17kqqxnq71jhl3-emacs-gcc-20210407.0.drv'.

@codygman
Copy link
Contributor Author

Well... I don't know how to fix this:

❯ sudo nix-collect-garbage -d
[sudo] password for cody: 
removing old generations of profile /nix/var/nix/profiles/system
removing old generations of profile /nix/var/nix/profiles/per-user/root/channels
removing old generations of profile /nix/var/nix/profiles/per-user/nixos/profile
removing old generations of profile /nix/var/nix/profiles/per-user/nixos/home-manager
removing old generations of profile /nix/var/nix/profiles/per-user/cody/channels
removing old generations of profile /nix/var/nix/profiles/per-user/cody/profile
removing old generations of profile /nix/var/nix/profiles/per-user/cody/home-manager
removing old generations of profile /nix/var/nix/profiles/default
removing old generations of profile /nix/var/nix/profiles/per-container/flake-test/system
finding garbage collector roots...
deleting garbage...
deleting '/nix/store/trash'
deleting unused links...
note: currently hard linking saves 20665.42 MiB
0 store paths deleted, 0.00 MiB freed

devos2  cody 「↪ ✘ 𝚫 📁 」  ⎔ took 18s 
❯ sudo nix shell ".#nixosConfigurations.razer.config.system.build.toplevel" -c switch-to-configuration switch
warning: Git tree '/home/cody/devos2' is dirty
error (ignored): error: cannot unlink '/nix/store/trash/mw3sn78f15rkzs17aa17kqqxnq71jhl3-emacs-gcc-20210407.0.drv.chroot/nix/store/3l6sdyzgn1hylmlgmrvnj1kcnz4plra2-emacs-gcc-20210407.0/share/emacs/28.0.50/lisp/obsolete': Directory not empty
error: builder for '/nix/store/mw3sn78f15rkzs17aa17kqqxnq71jhl3-emacs-gcc-20210407.0.drv' failed with exit code 2;
       last 10 log lines:
       > gzip: ./rot13.el: No such file or directory
       > gzip: ./windmove.el: No such file or directory
       > gzip: ./font-lock.el: No such file or directory
       > gzip: ./frame.el: No such file or directory
       > gzip: ./pixel-scroll.el: No such file or directory
       > gzip: ../etc/publicsuffix.txt: No such file or directory
       > make: *** [Makefile:581: install-arch-indep] Error 1
       > /nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: line 95: /dev/null: No such file or directory
       > /nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: line 76: /dev/null: No such file or directory
       > /nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: line 78: /dev/null: No such file or directory
       For full logs, run 'nix log /nix/store/mw3sn78f15rkzs17aa17kqqxnq71jhl3-emacs-gcc-20210407.0.drv'.
error: 1 dependencies of derivation '/nix/store/j1l9nyaq0psx7alr9wb7vd3qpwil50h9-emacs-gcc-with-packages-20210407.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/73fs7j47y9mdyrk0v85rn9fcnw6wbn3m-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/amprw6wk3wbfvyvgiqh1jkwnvf69m8az-nixos-system-razer-21.05.20210410.a73020b.drv' failed to build

devos2  cody 「↪ ✘ 𝚫 📁 」  ⎔ took 25m47s 

But I guess emacs-overlay updates every day so I'll just update my flake and... that fixes it? 🔎

@codygman
Copy link
Contributor Author

Well... I removed the ca-references and ca-derivations stuff and my laptop is working.

I then pulled updates to my PC and... now it's broken 😆

@nrdxp
Copy link
Collaborator

nrdxp commented Apr 15, 2021

My bad, I never should've enabled it in the first place. I'll remember to update this in the next release, which is hopefully coming on the weekend.

@Pacman99
Copy link
Member

Pacman99 commented May 5, 2021

I just ran into this for the second time. We really should drop ca-derivations by default.
And thank you @codygman for submitting the issue and explaining the solution, that saved me a lot of worry.

@nrdxp
Copy link
Collaborator

nrdxp commented May 9, 2021

Is it still there? I coulda swore I removed it. If not we can push a quick fix and push a patch release.

@Pacman99
Copy link
Member

This is now completely fixed in core. I would say to leave this open for a bit longer. In the case that others run into it, they can read this issue to learn how to fix it.

@Pacman99
Copy link
Member

Pacman99 commented Jun 4, 2021

Its been a couple weeks now since this has been fixed. Going to close, thanks for the report.

@Pacman99 Pacman99 closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants