From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Fix installer restart. Date: Tue, 11 Feb 2020 16:32:41 +0100 Message-ID: <87tv3xyw9y.fsf@gnu.org> References: <87sgjimtn2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44297) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1XWm-00028J-Q8 for guix-devel@gnu.org; Tue, 11 Feb 2020 10:32:46 -0500 In-Reply-To: <87sgjimtn2.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 10 Feb 2020 14:58:09 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Mathieu Othacehe Cc: Guix Devel Hi Mathieu, Mathieu Othacehe 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 > 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 =E2=80=9CFixes =E2=80=A6=E2=80=9D 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/msg0016= 1.html. > + (umount-cow-store) > + #f)))) LGTM! Did you make sure that: make check-system TESTS=3Dinstalled-os still passes? > From 50884fca871cfceb020d63e556c957163fdd6064 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > 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 raisi= ng 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 comme= nt. [=E2=80=A6] > --- a/gnu/installer/newt/final.scm > +++ b/gnu/installer/newt/final.scm > @@ -73,12 +73,15 @@ press the button to reboot.")) > 'success) >=20=20 > (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=E2=80=99d recommend using =E2=80=98match=E2=80=99 rather than =E2=80=98ca= se=E2=80=99, because =E2=80=98case=E2=80=99 silently returns *unspecified* when it fails to match the value. Apart from that, LGTM! Thank you, Ludo=E2=80=99. PS: I=E2=80=99m still looking at the installer tests we discussed before FO= SDEM, but life got in the way so progress is slow!