mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
guix system: Add "describe" action.
* guix/scripts/system.scm (show-help): Add "describe". (process-command): Handle it. (guix-system): Likewise. * doc/guix.texi (Invoking guix system): Document it.
This commit is contained in:
parent
60f4564a63
commit
158032bd7d
2 changed files with 14 additions and 1 deletions
|
@ -26301,6 +26301,10 @@ bootloader boot menu:
|
|||
|
||||
@table @code
|
||||
|
||||
@item describe
|
||||
Describe the current system generation: its file name, the kernel and
|
||||
bootloader used, etc., as well as provenance information when available.
|
||||
|
||||
@item list-generations
|
||||
List a summary of each generation of the operating system available on
|
||||
disk, in a human-readable way. This is similar to the
|
||||
|
|
|
@ -921,6 +921,8 @@ (define (show-help)
|
|||
reconfigure switch to a new operating system configuration\n"))
|
||||
(display (G_ "\
|
||||
roll-back switch to the previous operating system configuration\n"))
|
||||
(display (G_ "\
|
||||
describe describe the current system\n"))
|
||||
(display (G_ "\
|
||||
list-generations list the system generations\n"))
|
||||
(display (G_ "\
|
||||
|
@ -1196,6 +1198,12 @@ (define (process-command command args opts)
|
|||
((pattern) pattern)
|
||||
(x (leave (G_ "wrong number of arguments~%"))))))
|
||||
(list-generations pattern)))
|
||||
((describe)
|
||||
(match (generation-number %system-profile)
|
||||
(0
|
||||
(error (G_ "no system generation, nothing to describe~%")))
|
||||
(generation
|
||||
(display-system-generation generation))))
|
||||
((search)
|
||||
(apply (resolve-subcommand "search") args))
|
||||
;; The following commands need to use the store, but they do not need an
|
||||
|
@ -1235,7 +1243,8 @@ (define (parse-sub-command arg result)
|
|||
(case action
|
||||
((build container vm vm-image disk-image reconfigure init
|
||||
extension-graph shepherd-graph
|
||||
list-generations delete-generations roll-back
|
||||
list-generations describe
|
||||
delete-generations roll-back
|
||||
switch-generation search docker-image)
|
||||
(alist-cons 'action action result))
|
||||
(else (leave (G_ "~a: unknown action~%") action))))))
|
||||
|
|
Loading…
Reference in a new issue