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
a5acc17a3c
, it'd print #<file-system-label "foo">.
This commit is contained in:
parent
378daa8cb6
commit
e203f4c26a
|
@ -551,10 +551,26 @@ list of services."
|
||||||
;; TRANSLATORS: Please preserve the two-space indentation.
|
;; TRANSLATORS: Please preserve the two-space indentation.
|
||||||
(format #t (G_ " label: ~a~%") label)
|
(format #t (G_ " label: ~a~%") label)
|
||||||
(format #t (G_ " bootloader: ~a~%") bootloader-name)
|
(format #t (G_ " bootloader: ~a~%") bootloader-name)
|
||||||
(format #t (G_ " root device: ~a~%")
|
|
||||||
(if (uuid? root-device)
|
;; TRANSLATORS: The '~[', '~;', and '~]' sequences in this string must
|
||||||
(uuid->string root-device)
|
;; be preserved. They denote conditionals, such that the result will
|
||||||
root-device))
|
;; 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))))
|
(format #t (G_ " kernel: ~a~%") kernel))))
|
||||||
|
|
||||||
(define* (list-generations pattern #:optional (profile %system-profile))
|
(define* (list-generations pattern #:optional (profile %system-profile))
|
||||||
|
|
Loading…
Reference in New Issue