[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/21: installer: Tolerate an undefined system role in config generation
From: |
John Darrington |
Subject: |
05/21: installer: Tolerate an undefined system role in config generation. |
Date: |
Sun, 29 Jan 2017 07:35:01 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 7bd5d28c63a97ec83258d78cc47bbb5990edf34c
Author: John Darrington <address@hidden>
Date: Sun Jan 22 21:09:35 2017 +0100
installer: Tolerate an undefined system role in config generation.
* gnu/system/installer/configure.scm (generate-guix-config): Don't crash if
the
system-role is undefined.
---
gnu/system/installer/configure.scm | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/gnu/system/installer/configure.scm
b/gnu/system/installer/configure.scm
index 2980f4b..86eddd2 100644
--- a/gnu/system/installer/configure.scm
+++ b/gnu/system/installer/configure.scm
@@ -145,15 +145,17 @@
p #:width width)
(newline p)
- (pretty-print
- `(use-service-modules
- ,@(role-service-modules system-role)) p #:width width)
- (newline p)
-
- (pretty-print
- `(use-package-modules
- ,@(role-package-modules system-role)) p #:width width)
- (newline p)
+ (when system-role
+ (pretty-print
+ `(use-service-modules
+ ,@(role-service-modules system-role)) p #:width width)
+ (newline p))
+
+ (when system-role
+ (pretty-print
+ `(use-package-modules
+ ,@(role-package-modules system-role)) p #:width width)
+ (newline p))
(pretty-print
`(operating-system
@@ -193,14 +195,17 @@
mount-points)))
(users (cons* %base-user-accounts))
(packages (cons*
- ,@(role-packages system-role)
+ ,@(if system-role
+ (role-packages system-role)
+ '())
%base-packages))
(services (cons*
,@(if key-map
`((console-keymap-service ,key-map))
`())
- ,@(role-services system-role)
- ))
+ ,@(if system-role
+ (role-services system-role)
+ '())))
(name-service-switch %mdns-host-lookup-nss)) p #:width width)))
- branch wip-installer updated (61c0ffb -> 9ff399e), John Darrington, 2017/01/29
- 02/21: gurses: Use inverse instead of underline for field value area., John Darrington, 2017/01/29
- 07/21: installer: No passphrase is needed for clear networks., John Darrington, 2017/01/29
- 04/21: installer: Change livery., John Darrington, 2017/01/29
- 08/21: installer: Prepare for new wireless network features., John Darrington, 2017/01/29
- 05/21: installer: Tolerate an undefined system role in config generation.,
John Darrington <=
- 09/21: installer: Clear the mount point field for swap file systems., John Darrington, 2017/01/29
- 03/21: installer: Add new procedure to check file system specifications., John Darrington, 2017/01/29
- 01/21: installer: Delete unused procedure "justify"., John Darrington, 2017/01/29
- 20/21: gurses: Add new procedure "word-endings"., John Darrington, 2017/01/29
- 14/21: gurses: Add predicate to test if a complex char is blank., John Darrington, 2017/01/29
- 12/21: gurses: Avoid one usage of car and cdr., John Darrington, 2017/01/29
- 15/21: gurses: Avoid one more use of car and cdr., John Darrington, 2017/01/29
- 13/21: gurses: xchar->char: New procedure., John Darrington, 2017/01/29
- 19/21: installer: Support WEP encrypted wireless., John Darrington, 2017/01/29
- 16/21: gurses: Avoid yet another use of car and cdr., John Darrington, 2017/01/29