guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: services: gdm: Properly handle empty extensions lists.


From: guix-commits
Subject: 01/04: services: gdm: Properly handle empty extensions lists.
Date: Fri, 5 Apr 2019 11:55:57 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 0cf981a6066711f6e830a3f1d40f7c265b0bac94
Author: Ludovic Courtès <address@hidden>
Date:   Fri Apr 5 17:40:01 2019 +0200

    services: gdm: Properly handle empty extensions lists.
    
    Fixes a bug whereby not extending GDM would lead us to do:
    
      (first '())
    
    in the 'compose' method.
    
    Regression introduced in 305a732a0a19c5810aab401aa7d70eba02ac386b.
    
    * gnu/services/xorg.scm (gdm-service-type)[compose]: Handle the case
    where EXTENSIONS is empty.
    [extend]: Handle the case where XORG-CONFIGURATION is #f.
---
 gnu/services/xorg.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 26ca0d4..ede8bc7 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -879,11 +879,16 @@ the GNOME desktop environment.")
                 ;; For convenience, this service can be extended with an
                 ;; <xorg-configuration> record.  Take the first one that
                 ;; comes.
-                (compose first)
+                (compose (lambda (extensions)
+                           (match extensions
+                             (() #f)
+                             ((config . _) config))))
                 (extend (lambda (config xorg-configuration)
-                          (gdm-configuration
-                           (inherit config)
-                           (xorg-configuration xorg-configuration))))
+                          (if xorg-configuration
+                              (gdm-configuration
+                               (inherit config)
+                               (xorg-configuration xorg-configuration))
+                              config)))
 
                 (default-value (gdm-configuration))
                 (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]