unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: 40207@debbugs.gnu.org
Cc: Mathieu Othacehe <m.othacehe@gmail.com>
Subject: [bug#40207] [PATCH 1/2] installer: tests: Use a filter to select desktop-environments.
Date: Tue, 24 Mar 2020 09:36:25 +0100	[thread overview]
Message-ID: <20200324083626.30650-1-m.othacehe@gmail.com> (raw)
In-Reply-To: <20200324083443.30544-1-m.othacehe@gmail.com>

* gnu/installer/tests.scm (choose-services): Turn desktop-environments list
into a choose-desktop-environment procedure. This way, it is easier to select
all desktop-environments or none, in the same way as choose-network-service?
and choose-network-management-tool? arguments.
---
 gnu/installer/tests.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 6f5393e3ab..07f3121083 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -211,7 +212,7 @@ ROOT-PASSWORD, and USERS."
 
 (define* (choose-services port
                           #:key
-                          (desktop-environments '("GNOME"))
+                          (choose-desktop-environment? (const #f))
                           (choose-network-service?
                            (lambda (service)
                              (or (string-contains service "SSH")
@@ -220,10 +221,14 @@ ROOT-PASSWORD, and USERS."
                            (lambda (service)
                              (string-contains service "DHCP"))))
   "Converse over PORT to choose networking services."
+  (define desktop-environments '())
+
   (converse port
     ((checkbox-list (title "Desktop environment") (text _)
-                    (items _))
-     desktop-environments)
+                    (items ,services))
+     (let ((services* (filter choose-desktop-environment? services)))
+       (set! desktop-environments services*)
+       services*))
     ((checkbox-list (title "Network service") (text _)
                     (items ,services))
      (filter choose-network-service? services))
-- 
2.25.1

  reply	other threads:[~2020-03-24  8:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24  8:34 [bug#40207] [PATCH 0/2] Add a desktop graphical installer test Mathieu Othacehe
2020-03-24  8:36 ` Mathieu Othacehe [this message]
2020-03-24  8:36   ` [bug#40207] [PATCH 2/2] tests: install: Add %test-gui-installed-desktop-os-encrypted Mathieu Othacehe
2020-03-24 10:38     ` Ludovic Courtès
2020-03-25 17:57       ` Mathieu Othacehe
2020-03-25 21:41         ` Ludovic Courtès
2020-03-26 10:54           ` Mathieu Othacehe
2020-03-24 10:31   ` [bug#40207] [PATCH 1/2] installer: tests: Use a filter to select desktop-environments Ludovic Courtès
2020-03-24 10:35     ` Mathieu Othacehe

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=20200324083626.30650-1-m.othacehe@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=40207@debbugs.gnu.org \
    /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).