mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
time-machine: Print profile path if no command is given.
Instead of warning, print the profile path of the cached-channel-instance. * guix/scripts/time-machine.scm (guix-time-machine)[not command-line]: Print the profile directory. (show-help): Adjust usage message. * doc/guix.texi (Invoking guix time-machine): Document it. Change-Id: Id2c1ded514e6c5af45af9008ad1ef91beb509177 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
56632b081f
commit
db1a1dc0b2
2 changed files with 28 additions and 21 deletions
|
@ -4762,6 +4762,11 @@ Note that @command{guix time-machine} can trigger builds of channels and
|
||||||
their dependencies, and these are controlled by the standard build
|
their dependencies, and these are controlled by the standard build
|
||||||
options (@pxref{Common Build Options}).
|
options (@pxref{Common Build Options}).
|
||||||
|
|
||||||
|
If @command{guix time-machine} is executed without any command, it
|
||||||
|
prints the file name of the profile that would be used to execute the
|
||||||
|
command. This is sometimes useful if you need to get store file name of
|
||||||
|
the profile---e.g., when you want to @command{guix copy} it.
|
||||||
|
|
||||||
@node Inferiors
|
@node Inferiors
|
||||||
@section Inferiors
|
@section Inferiors
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,10 @@ (define-module (guix scripts time-machine)
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define (show-help)
|
(define (show-help)
|
||||||
(display (G_ "Usage: guix time-machine [OPTION] -- COMMAND ARGS...
|
(display (G_ "Usage: guix time-machine [OPTION] [-- COMMAND ARGS...]
|
||||||
Execute COMMAND ARGS... in an older version of Guix.\n"))
|
Execute COMMAND ARGS... in an older version of Guix.
|
||||||
|
|
||||||
|
If COMMAND is not provided, print path to the time-machine profile.\n"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-C, --channels=FILE deploy the channels defined in FILE"))
|
-C, --channels=FILE deploy the channels defined in FILE"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
@ -179,7 +181,6 @@ (define-command (guix-time-machine . args)
|
||||||
(ref (assoc-ref opts 'ref))
|
(ref (assoc-ref opts 'ref))
|
||||||
(substitutes? (assoc-ref opts 'substitutes?))
|
(substitutes? (assoc-ref opts 'substitutes?))
|
||||||
(authenticate? (assoc-ref opts 'authenticate-channels?)))
|
(authenticate? (assoc-ref opts 'authenticate-channels?)))
|
||||||
(if command-line
|
|
||||||
(let* ((directory
|
(let* ((directory
|
||||||
(with-store store
|
(with-store store
|
||||||
(with-status-verbosity (assoc-ref opts 'verbosity)
|
(with-status-verbosity (assoc-ref opts 'verbosity)
|
||||||
|
@ -196,5 +197,6 @@ (define-command (guix-time-machine . args)
|
||||||
#:validate-channels
|
#:validate-channels
|
||||||
validate-guix-channel)))))
|
validate-guix-channel)))))
|
||||||
(executable (string-append directory "/bin/guix")))
|
(executable (string-append directory "/bin/guix")))
|
||||||
(apply execl (cons* executable executable command-line)))
|
(if command-line
|
||||||
(warning (G_ "no command specified; nothing to do~%")))))))
|
(apply execl (cons* executable executable command-line))
|
||||||
|
(format #t "~a\n" directory)))))))
|
||||||
|
|
Loading…
Reference in a new issue