all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Fix installer restart.
Date: Tue, 11 Feb 2020 16:32:41 +0100	[thread overview]
Message-ID: <87tv3xyw9y.fsf@gnu.org> (raw)
In-Reply-To: <87sgjimtn2.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 10 Feb 2020 14:58:09 +0100")

Hi Mathieu,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> Here are two patches that should fix the "Installer fails when
> restarted" issue.

Great!

> I also fixed the "installation failed dialog". There are now two
> options:
> * "Resume": let the user resume the installation from any step (from the
> installation menu)
> * "Retry": restart the installer process.

Nice.

> From f02ef650526973af55cf1629de1cc48e888c714f Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <m.othacehe@gmail.com>
> Date: Mon, 10 Feb 2020 14:43:05 +0100
> Subject: [PATCH 1/2] installer: Remove the cow-store overlay after system
>  installation.
>
> * gnu/installer/final.scm (umount-cow-store): New procedure ...,
> (install-system): ... used here, to remove the store overlay so that the
> target device is not seen as busy during further umount calls.

Please add a “Fixes …” line in the log, for future reference.

> +    (dynamic-wind
> +      (lambda ()
> +        (start-service 'cow-store (list (%installer-target-dir))))
> +      (lambda ()
> +        (run-shell-command install-command #:locale locale))
> +      (lambda ()
> +        (stop-service 'cow-store)
> +        ;; Remove the store overlay created at cow-store service start.
> +        ;; Failing to do that will result in further umount calls to fail
> +        ;; because the target device is seen as busy. See:
> +        ;; https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00161.html.
> +        (umount-cow-store)
> +        #f))))

LGTM!

Did you make sure that:

  make check-system TESTS=installed-os

still passes?

> From 50884fca871cfceb020d63e556c957163fdd6064 Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <m.othacehe@gmail.com>
> Date: Mon, 10 Feb 2020 14:47:56 +0100
> Subject: [PATCH 2/2] installer: Fix installer restart dialog.
>
> * gnu/installer/newt/final.scm (run-install-failed-page): Propose between
> installer resume or restart. Do actually resume the installation by raising an
> &installer-step-abort condition if "Resume" button is pressed. Otherwise, keep
> going as the installer will be restarted by login.
> * gnu/installer.scm (installer-program): Remove the associated TODO comment.

[…]

> --- a/gnu/installer/newt/final.scm
> +++ b/gnu/installer/newt/final.scm
> @@ -73,12 +73,15 @@ press the button to reboot."))
>    'success)
>  
>  (define (run-install-failed-page)
> -  (choice-window
> -   (G_ "Installation failed")
> -   (G_ "Restart installer")
> -   (G_ "Retry system install")
> -   (G_ "The final system installation step failed.  You can retry the \
> -last step, or restart the installer.")))
> +  (case (choice-window
> +         (G_ "Installation failed")
> +         (G_ "Resume")
> +         (G_ "Restart the installer")
> +         (G_ "The final system installation step failed.  You can resume from \
> +a specific step, or restart the installer."))
> +    ((1) (raise
> +          (condition
> +           (&installer-step-abort))))))

I’d recommend using ‘match’ rather than ‘case’, because ‘case’ silently
returns *unspecified* when it fails to match the value.

Apart from that, LGTM!

Thank you,
Ludo’.

PS: I’m still looking at the installer tests we discussed before FOSDEM,
    but life got in the way so progress is slow!

  parent reply	other threads:[~2020-02-11 15:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 13:58 Fix installer restart Mathieu Othacehe
2020-02-10 14:38 ` Mathieu Othacehe
2020-02-12 10:04   ` bug#39217: " Mathieu Othacehe
2020-02-10 14:38 ` bug#38447: " Mathieu Othacehe
2020-02-10 14:38 ` bug#39217: " Mathieu Othacehe
2020-02-11 15:32 ` Ludovic Courtès [this message]
2020-02-12 10:02   ` Mathieu Othacehe
2020-02-24 16:46     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv3xyw9y.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=m.othacehe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.