guix home reconfigure fails with “rmdir: No such file or directory”

  • Done
  • quality assurance status badge
Details
4 participants
  • Brian Cully
  • Ludovic Courtès
  • Madhavan Krishnan
  • Christopher Rodriguez
Owner
unassigned
Submitted by
Brian Cully
Severity
normal
B
B
Brian Cully wrote on 10 Apr 2022 01:53
(address . bug-guix@gnu.org)
878rsdbygd.fsf@ditto.jhoto.spork.org
For the last few days, attempting to issue a home reconfigure fails:

---[snip]---
$ guix home reconfigure ./guix-home/config-new.scm
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/rbnri9gpvh98qagyk7ws4y5xdvz4skg7-home.drv
/gnu/store/hg5whdfsq2ldibfsikhbwppr9pms5vc8-provenance.drv
/gnu/store/rsil5s5fs14y2jvysbiv7vi2f0i3gnw2-activate.drv
/gnu/store/j85krrfbnc7x6s5wdn0wnp8ikah9gl46-update-symlinks.drv

building /gnu/store/hg5whdfsq2ldibfsikhbwppr9pms5vc8-provenance.drv...
building /gnu/store/j85krrfbnc7x6s5wdn0wnp8ikah9gl46-update-symlinks.drv...
building /gnu/store/rsil5s5fs14y2jvysbiv7vi2f0i3gnw2-activate.drv...
building /gnu/store/rbnri9gpvh98qagyk7ws4y5xdvz4skg7-home.drv...
Cleaning up symlinks from previous home at /gnu/store/zmp2brsdr0nvrhpbk4kqqc6y8jx90kb1-home.

guix home: error: rmdir: No such file or directory
---[snip]---

This fails in the same way even when using a previously working
configuration:

---[snip]---
$ guix home list-generations
Generation 27 Apr 05 2022 19:44:03 (current)
file name: /var/guix/profiles/per-user/bjc/guix-home-27-link
canonical file name: /gnu/store/zmp2brsdr0nvrhpbk4kqqc6y8jx90kb1-home
channels:
guix:
branch: master
commit: 3b3cc9dfed30afec70a6feaced3710bf79f8b2bc
configuration file: /gnu/store/k90xv2x75nfc1wyxbw4171m6wxykqck6-configuration.scm

$ guix home reconfigure /gnu/store/k90xv2x75nfc1wyxbw4171m6wxykqck6-configuration.scm
Cleaning up symlinks from previous home at /gnu/store/zmp2brsdr0nvrhpbk4kqqc6y8jx90kb1-home.

guix home: error: rmdir: No such file or directory
---[snip]---

-bjc
M
M
Madhavan Krishnan wrote on 10 Apr 2022 14:12
guix home: error: rmdir: No such file or directory
(address . 54831@debbugs.gnu.org)
CAEqKSu1dJbMCR0THUB9n60sbNXchmYRaK+LNqej+ZTFZBNwkuw@mail.gmail.com
I am facing the same issue on ec6a585ee2fd91c857276479411eedd0756e0093; and
would like to add to this

The *build* command for the said config works ie)
guix home build config.scm

Whereas the reconfigure fails with
guix home: error: rmdir: No such file or directory

--Madhavan
Attachment: file
C
C
Christopher Rodriguez wrote on 10 Apr 2022 17:47
Unhandled ENOENT exception
(address . 54831@debbugs.gnu.org)
pkmp4ezgktgc83.fsf@crane.ant.amazon.com
Christopher Rodriguez


Table of Contents
?????????????????




I'd like to add my $0.02 as well.

Seems like the issue is during the deployment, as Madhavan
said. Specifically, the error message in that form only appears in
`gnu/home/services/symlink-manager.scm', in the function
`cleanup-symlinks'.

It seems that, right now, the issue is that `ENOTEMPTY' and `ENOTDIR'
are tested for and handled, but `ENOENT' is not. Ideally, this should be
handled and tell the user /which/ file or directory is missing, not halt
the entire process. And, since we are testing for a missing file (and
thus have no chance of overwriting a user's data), it would probably
make the most sense to just create the file that is missing in the next
step, without stopping at all.

I'll throw together a patch real quick to test with. I could be very off
base, but I think this should fix this issue.
Attachment: file
--

Christopher Rodriguez
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEJMQbvYVxvZ0eF/84XZ6FgaGVz3sFAmJS/xwACgkQXZ6FgaGV
z3s7TxAAx5AtBXvULtlbQN4QI9cyluNv60zXQyX4+I0XakaZ0uICFc2Gd9NB4++8
eZUP6c1Gq1l2Zt38YUDOeiNdt0akkNi5TG0+RGPk2wo230weqnAeBQxlf6Q5WHGx
p4L7xlpDwSvyiPZBfGLvZ/vBHT0/e81sffA2vWs/rxDjKQWLic7MvXQotKBm+URg
iGYNHEKT9Ew/pyf56Z1enep7/Iq4XpU0jn1zLR7zDd/aBTgWGdPmqKbOIGmAa0Zz
2X3KE0r4j58WQ8bdcug2BImpZMFYOTm8ONxWc5msxJTVE4Vvud5yn1ez0oAzfC9L
k9zJ1+tZQj2LdZ3bJ1cc8sO8Dw5W1IpsIPtFsBYjjskzeOgNn/vYw22UX0tyWA+r
eR2BRGt0agiSVqnr1DUsCPtPcop/kTo4GlTzg0lUO/7iqYRMp6Z2wiYQjCxuC949
DUYUHimIeP+aZoyhj8VvwI7R/iVcDsqwXEPTpBnEMEyQMFn3/JskJOVsBJUEQRlJ
3FhJK1M5VnFfMPwA9f8iGcR5DE8bKJKie2X42GCu0ZxVL0er2x4BflNIeYoQY0Q6
/bW7Mv4d1W/+eVBAslh8LoZ2k3cl22SlWjLpfaSCIxuKPacbn6FwzgUbqeLoa63L
jkWsZhf1L7gI68FEWVPqnd4NjWNP9fW4qn9v85P58Porm6ID+Ko=
=uMcE
-----END PGP SIGNATURE-----

C
C
Christopher Rodriguez wrote on 10 Apr 2022 17:47
(address . 54831@debbugs.gnu.org)
pkmp4ewnfxgc6o.fsf@crane.ant.amazon.com
Christopher Rodriguez


Table of Contents
?????????????????




I'd like to add my $0.02 as well.

Seems like the issue is during the deployment, as Madhavan
said. Specifically, the error message in that form only appears in
`gnu/home/services/symlink-manager.scm', in the function
`cleanup-symlinks'.

It seems that, right now, the issue is that `ENOTEMPTY' and `ENOTDIR'
are tested for and handled, but `ENOENT' is not. Ideally, this should be
handled and tell the user /which/ file or directory is missing, not halt
the entire process. And, since we are testing for a missing file (and
thus have no chance of overwriting a user's data), it would probably
make the most sense to just create the file that is missing in the next
step, without stopping at all.

I'll throw together a patch real quick to test with. I could be very off
base, but I think this should fix this issue.
Attachment: file
--

Christopher Rodriguez
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEJMQbvYVxvZ0eF/84XZ6FgaGVz3sFAmJS/08ACgkQXZ6FgaGV
z3txsQ/+OZ42WnjCye/RwDgahEVaGQzs7wYGcUOLQOcFd0tmG32+ytm9YN8pIU7t
lCxoELMZ6VNIPkuAX+ugnylM+/nMRDJIovKeRnzOKHekkf7u9OY7vB4LhDR1YtWT
dchAk6FcDBSGVvC9lmJS1OZuZcDEkKQMNcEoWok4fOWx0p95hAuzIrBbCkDpuCEH
yiiJS7I48ssTPBUAT/1hfxFJIfPmIJvNPmERhf2uBoheEgkegcUA0HfbO3WkSr+D
eW4bDW+0r+b53vDdDoGZoS+UxDkAcJwP0TmjJArQTschBcmnBE6cN6uV/qcPRh3/
BceajngpahEvQxe9iBiP9FZhzGXWgd1UdKEbml8WlCZVpfZExjPYh/2dJiJhQ9aq
SFtx4gapMOR1Ja0Rf8ofg/nQGaS4KOFlbsu/V/dEMyhqR0hqtVASM8BRx2UFouAW
06GD65Mpugid6A/Nv7iQWLy8pkLEPJ2LCEAWSwt+vo9WS1EvurzyFgK0qBUMtx04
3z4a+Ssd9RSTKenSX9UYibvaz8olRzMIrGxai1Zd+zFWXHvrB9ZZk/HUPDI3k3Tn
LoH3DhPtb6O3a/r+cmrx4c8BmnClPVS1pp8BBg0aOpbJTl2hG8d/22ej7m4PK5vk
SJGtShRlG9uGc0jDCpnRS9nGKJaNWycMOd5Fd7WEhQ2+xHwlzvk=
=RT93
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 11 Apr 2022 22:46
Re: bug#54831: guix home reconfigure fails with “rmdir: No such file or directory”
(address . 54831-done@debbugs.gnu.org)
87bkx7fiv3.fsf@gnu.org
Hi all,

Brian Cully <bjc@spork.org> skribis:

Toggle quote (21 lines)
> For the last few days, attempting to issue a home reconfigure fails:
>
> ---[snip]---
> $ guix home reconfigure ./guix-home/config-new.scm
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
> The following derivations will be built:
> /gnu/store/rbnri9gpvh98qagyk7ws4y5xdvz4skg7-home.drv
> /gnu/store/hg5whdfsq2ldibfsikhbwppr9pms5vc8-provenance.drv
> /gnu/store/rsil5s5fs14y2jvysbiv7vi2f0i3gnw2-activate.drv
> /gnu/store/j85krrfbnc7x6s5wdn0wnp8ikah9gl46-update-symlinks.drv
>
> building /gnu/store/hg5whdfsq2ldibfsikhbwppr9pms5vc8-provenance.drv...
> building /gnu/store/j85krrfbnc7x6s5wdn0wnp8ikah9gl46-update-symlinks.drv...
> building /gnu/store/rsil5s5fs14y2jvysbiv7vi2f0i3gnw2-activate.drv...
> building /gnu/store/rbnri9gpvh98qagyk7ws4y5xdvz4skg7-home.drv...
> Cleaning up symlinks from previous home at /gnu/store/zmp2brsdr0nvrhpbk4kqqc6y8jx90kb1-home.
>
> guix home: error: rmdir: No such file or directory
> ---[snip]---

Christopher Rodriguez <yewscion@gmail.com> skribis:

Toggle quote (16 lines)
> Seems like the issue is during the deployment, as Madhavan
> said. Specifically, the error message in that form only appears in
> `gnu/home/services/symlink-manager.scm', in the function
> `cleanup-symlinks'.
>
> It seems that, right now, the issue is that `ENOTEMPTY' and `ENOTDIR'
> are tested for and handled, but `ENOENT' is not. Ideally, this should be
> handled and tell the user /which/ file or directory is missing, not halt
> the entire process. And, since we are testing for a missing file (and
> thus have no chance of overwriting a user's data), it would probably
> make the most sense to just create the file that is missing in the next
> step, without stopping at all.
>
> I'll throw together a patch real quick to test with. I could be very off
> base, but I think this should fix this issue.

You were right.

This is fixed by commit 435e1cef0025fbe6cbb71b472218e8d132d1681c, pushed
yesterday. The patch had been submitted as part of
https://issues.guix.gnu.org/52808 but had not been applied. Apologies
for the breakage.

Thanks,
Ludo’.
Closed
?