Subject: bug#49811: Empty store items

From: Jérémy Korwin-Zmijowski <[email-masked]>
Date: Sun, 25 Sep 2022 21:57:22 +0000

Hi,

Right now, I have an empty store item : openssh-8.9p1.
Could be the result of brutal shutdown (laptop battery)…

The Guix daemon uses :

# ll /run/current-system/profile/bin/ssh-agent
lrwxrwxrwx 1 root root 71  1 janv.  1970 /run/current-
system/profile/bin/ssh-agent ->
/gnu/store/phympnkbmb96h1x1wkg8mqx2fsdawrr5-openssh-8.9p1/bin/ssh-agent

Which is OK. But, my regular user uses :

$ ll /home/jeko/.guix-profile/bin/ssh-agent
lrwxrwxrwx 1 root root 71  1 janv.  1970 /home/jeko/.guix-
profile/bin/ssh-agent -> /gnu/store/ffp49k0wci7h36lk38lasx4r5lc4i7iv-
openssh-8.9p1/bin/ssh-agent

$ ll /gnu/store/ffp49k0wci7h36lk38lasx4r5lc4i7iv-openssh-8.9p1/bin/ssh-
agent
-r-xr-xr-x 1 root root 0  1 janv.  1970
/gnu/store/ffp49k0wci7h36lk38lasx4r5lc4i7iv-openssh-8.9p1/bin/ssh-agent

Which is empty.
I tried to fix this situation with :

guix gc --verify=repair,contents
guix build --repair openssh
guix build --check openssh
guix build -d openssh
guix gc --optimize
guix gc -D /gnu/store/ffp49k0wci7h36lk38lasx4r5lc4i7iv-openssh-8.9p1

But nothing worked.
I read somewhere deleting /gnu/store/.links could be helpful but as I'm
not sure I did not.

Until I solved my issue, I can provide info haha

Jérémy