[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/09: guix system: 'list-generation' correctly displays file system lab
From: |
Ludovic Courtès |
Subject: |
03/09: guix system: 'list-generation' correctly displays file system labels. |
Date: |
Wed, 20 Jun 2018 17:47:40 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e203f4c26a5b8a26e8e214517fef012fc2cd294e
Author: Ludovic Courtès <address@hidden>
Date: Wed Jun 20 15:19:52 2018 +0200
guix system: 'list-generation' correctly displays file system labels.
* guix/scripts/system.scm (display-system-generation): Correctly display
file system labels. Previously, starting from commit
a5acc17a3c10a3779b5b8b1a2565ef130be77e51, it'd print #<file-system-label
"foo">.
---
guix/scripts/system.scm | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 727f1ac..a3f0163 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -551,10 +551,26 @@ list of services."
;; TRANSLATORS: Please preserve the two-space indentation.
(format #t (G_ " label: ~a~%") label)
(format #t (G_ " bootloader: ~a~%") bootloader-name)
- (format #t (G_ " root device: ~a~%")
- (if (uuid? root-device)
- (uuid->string root-device)
- root-device))
+
+ ;; TRANSLATORS: The '~[', '~;', and '~]' sequences in this string must
+ ;; be preserved. They denote conditionals, such that the result will
+ ;; look like:
+ ;; root device: UUID: 12345-678
+ ;; or:
+ ;; root device: label: "my-root"
+ ;; or just:
+ ;; root device: /dev/sda3
+ (format #t (G_ " root device: ~[UUID: ~a~;label: ~s~;~a~]~%")
+ (cond ((uuid? root-device) 0)
+ ((file-system-label? root-device) 1)
+ (else 2))
+ (cond ((uuid? root-device)
+ (uuid->string root-device))
+ ((file-system-label? root-device)
+ (file-system-label->string root-device))
+ (else
+ root-device)))
+
(format #t (G_ " kernel: ~a~%") kernel))))
(define* (list-generations pattern #:optional (profile %system-profile))
- branch master updated (6a8d338 -> 913f1f1), Ludovic Courtès, 2018/06/20
- 05/09: gnu: Add emacs-mu4e-conversation., Ludovic Courtès, 2018/06/20
- 03/09: guix system: 'list-generation' correctly displays file system labels.,
Ludovic Courtès <=
- 06/09: gnu: emacs-evil-collection: Update to 20180617., Ludovic Courtès, 2018/06/20
- 01/09: services: Add description to core services., Ludovic Courtès, 2018/06/20
- 08/09: gnu: emacs-evil-mu4e: Deprecate in favor of emacs-evil-collection., Ludovic Courtès, 2018/06/20
- 04/09: Update NEWS., Ludovic Courtès, 2018/06/20
- 09/09: gnu: emacs-evil: Update to 20180517., Ludovic Courtès, 2018/06/20
- 02/09: services: boot: Take gexps instead of monadic gexps., Ludovic Courtès, 2018/06/20
- 07/09: gnu: emacs-evil-ediff: Deprecate in favor of emacs-evil-collection., Ludovic Courtès, 2018/06/20