unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: raid5atemyhomework <raid5atemyhomework@protonmail.com>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: Adding Substitute Mirrors page to installer
Date: Thu, 01 Apr 2021 11:22:05 +0200	[thread overview]
Message-ID: <87o8eys6ki.fsf@gnu.org> (raw)
In-Reply-To: <3YQTy8cg8z-IZkxgM7lJSk8ZeolHbf4t7_HPw9Q8GCkx1lP7CXrbdtPZ9Hvyo--NvKXyr9W2iv82d8lL2T0NQPpTPhDbBFo3_3jQ3eAdAEI=@protonmail.com> (raid5atemyhomework@protonmail.com's message of "Tue, 16 Mar 2021 15:55:57 +0000")


Hello,

Thanks for this patch, it seems to work fine!

> +         ;; Extract the substitute URLs of the user configuration.
> +         (os              (read-operating-system (%installer-configuration-file)))
> +         (substitute-urls (and=> (find
> +                                   (lambda (service)
> +                                     (eq? guix-service-type
> +                                          (service-kind service)))
> +                                   (operating-system-services os))
> +                                 (compose guix-configuration-substitute-urls
> +                                          service-value)))

We could make the mirror selection a proper step, adding it to (gnu
installer record). Then in (gnu installer), you could add:

--8<---------------cut here---------------start------------->8---
  (installer-step
   (id 'mirrors)
   (description (G_ "Mirror substitute server"))
   (compute (lambda _
              ((installer-mirrors-page current-installer)))))
--8<---------------cut here---------------end--------------->8---

This way, you should be able to select the step result in
"run-final-page" this way:

--8<---------------cut here---------------start------------->8---
(let* ((configuration   (format-configuration prev-steps result))
       (user-partitions (result-step result 'partition))
       (locale          (result-step result 'locale))
       (users           (result-step result 'user))
       (mirrors         (result-step result 'mirrors))
       (install-ok?
        (with-mounted-partitions
         user-partitions
         (configuration->file configuration)
         (run-config-display-page #:locale locale)
         (run-install-shell locale #:users users #:mirrors mirrors))))
  ...)
--8<---------------cut here---------------end--------------->8---

That would avoid the need to parse the resulting configuration file.

> +(define (run-substitute-mirror-page)
> +  (let ((title (G_ "Substitute mirror")))
> +    (run-listbox-selection-page
> +      #:title title
> +      #:info-text (G_ "Choose a server to get substitutes from.
> +
> +Depending on your location, the official substitutes server can be slow; \
> +in that case, using a mirror may be faster.")

I wonder if it would make sense to select multiple mirrors, as fallback
if the preferred mirror is not up to date. We could also add the
possibility for the user to add a mirror manually.

In that case, the mirror page could look like the "User creation" page,
with an "Add" button opening a popup proposing to type a mirror URL or
to select one from an existing list.

WDYT?

Thanks,

Mathieu


  parent reply	other threads:[~2021-04-01  9:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07  2:46 Adding Substitute Mirrors page to installer raid5atemyhomework
2021-03-09  2:34 ` raid5atemyhomework
2021-03-09  8:05   ` Pierre Neidhardt
2021-03-10  9:49     ` raid5atemyhomework
2021-03-15 16:14       ` Ludovic Courtès
2021-03-15 22:53       ` zimoun
2021-03-16  1:07       ` raid5atemyhomework
2021-03-16 15:55         ` raid5atemyhomework
2021-03-27  6:48           ` raid5atemyhomework
2021-03-27  8:56             ` Mathieu Othacehe
2021-04-01  9:22           ` Mathieu Othacehe [this message]
2021-04-22  5:23             ` raid5atemyhomework
2021-05-13  1:27               ` raid5atemyhomework
2021-05-31  9:42                 ` raid5atemyhomework
2021-05-31 10:04                   ` Maxime Devos
2021-06-01  6:39                     ` raid5atemyhomework
2021-06-01  8:30               ` Mathieu Othacehe
2021-06-02 14:44                 ` raid5atemyhomework
2021-07-23 14:53                   ` raid5atemyhomework
2021-07-23 15:10                     ` Tobias Geerinckx-Rice
2021-07-23 15:21                       ` raid5atemyhomework
2021-08-01  9:42                         ` raid5atemyhomework
2021-08-01 12:28                         ` Christopher Baines
2021-12-01  6:11                           ` raid5atemyhomework
2021-12-01  8:16                             ` zimoun
2021-12-01 22:49                               ` raid5atemyhomework
2021-12-02  9:36                                 ` zimoun
2021-12-02 10:20                                   ` Jonathan Brielmaier

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87o8eys6ki.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=raid5atemyhomework@protonmail.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).