Subject: guix deploy fails, leaving the newly installed system generation active

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 25 Sep 2022 22:37:48 -0400

Hi,

While attempting to deploy to overdrive1, using the 9971141 commit in
the maintenance repo, I encountered the following error:

--8<---------------cut here---------------start------------->8---
maxim@hurd ~/src/guix-maintenance/hydra$ guix time-machine --commit=08d515233241ee0921b8b5ab706f98170c62437c -- deploy -L modules deploy-overdrive1.scm
The following 1 machine will be deployed:
  overdrive1

guix deploy: deploying to overdrive1...
guix deploy: sending 0 store items (0 MiB) to 'overdrive1.guix.gnu.org'...
guix deploy: sending 0 store items (0 MiB) to 'overdrive1.guix.gnu.org'...
guix deploy: sending 0 store items (0 MiB) to 'overdrive1.guix.gnu.org'...
guix deploy: error: failed to deploy overdrive1: failed to switch systems while deploying 'overdrive1':
system-error "symlink" "~A" ("File exists") (17)
--8<---------------cut here---------------end--------------->8---

It also looks like even the above failed to "deploy" fully, the system
generation was left as the last active one:

--8<---------------cut here---------------start------------->8---
[...]
Generation 28   Sep 26 2022 04:04:36    (current)
  file name: /var/guix/profiles/system-28-link
  canonical file name: /gnu/store/c02w7nyl5nr19x856455p2wh959r25h8-system
  label: GNU with Linux-Libre 5.19.10
  bootloader: grub-efi
  root device: /dev/sda3
  kernel: /gnu/store/nmdy7c4i34y12w8af7zl6sl9fmrp8wa0-linux-libre-5.19.10/Image
  channels:
    sfl-packages:
      repository URL: https://gitlab.com/Apteryks/sfl-guix-channel
      branch: master
      commit: 6385881124429016f750b0f562b70e07f592275e
    guix:
      repository URL: https://git.savannah.gnu.org/git/guix.git
      commit: 08d515233241ee0921b8b5ab706f98170c62437c
  configuration file: /gnu/store/myvzd1kpw2pfzfj3krl4lzpcbqsdn48x-configuration.scm
--8<---------------cut here---------------end--------------->8---

Which leaves me with two questions:

1. why did it fail?

2. when it encounters any error while deploying, shouldn't the
generation be removed instead of left as the active one?

Thanks,

Maxim