unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#72928] [PATCH] time-machine: Print profile path if no command is given.
@ 2024-09-01 13:54 Tomas Volf
  2024-09-09 14:40 ` Ludovic Courtès
  2024-10-06 13:23 ` [bug#72928] [PATCH v2] " Tomas Volf
  0 siblings, 2 replies; 11+ messages in thread
From: Tomas Volf @ 2024-09-01 13:54 UTC (permalink / raw)
  To: 72928
  Cc: Tomas Volf, Christopher Baines, Josselin Poiret,
	Ludovic Courtès, Mathieu Othacehe, Simon Tournier,
	Tobias Geerinckx-Rice

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.

Change-Id: Id2c1ded514e6c5af45af9008ad1ef91beb509177
---
 guix/scripts/time-machine.scm | 38 +++++++++++++++++------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
index d9ce85df84..8cad457ade 100644
--- a/guix/scripts/time-machine.scm
+++ b/guix/scripts/time-machine.scm
@@ -179,22 +179,22 @@ (define-command (guix-time-machine . args)
             (ref          (assoc-ref opts 'ref))
             (substitutes?  (assoc-ref opts 'substitutes?))
             (authenticate? (assoc-ref opts 'authenticate-channels?)))
-       (if command-line
-           (let* ((directory
-                   (with-store store
-                     (with-status-verbosity (assoc-ref opts 'verbosity)
-                       (with-build-handler (build-notifier #:use-substitutes?
-                                                           substitutes?
-                                                           #:verbosity
-                                                           (assoc-ref opts 'verbosity)
-                                                           #:dry-run? #f)
-                         (set-build-options-from-command-line store opts)
-                         (cached-channel-instance store channels
-                                                  #:authenticate? authenticate?
-                                                  #:reference-channels
-                                                  %reference-channels
-                                                  #:validate-channels
-                                                  validate-guix-channel)))))
-                  (executable (string-append directory "/bin/guix")))
-             (apply execl (cons* executable executable command-line)))
-           (warning (G_ "no command specified; nothing to do~%")))))))
+       (let* ((directory
+               (with-store store
+                 (with-status-verbosity (assoc-ref opts 'verbosity)
+                   (with-build-handler (build-notifier #:use-substitutes?
+                                                       substitutes?
+                                                       #:verbosity
+                                                       (assoc-ref opts 'verbosity)
+                                                       #:dry-run? #f)
+                     (set-build-options-from-command-line store opts)
+                     (cached-channel-instance store channels
+                                              #:authenticate? authenticate?
+                                              #:reference-channels
+                                              %reference-channels
+                                              #:validate-channels
+                                              validate-guix-channel)))))
+              (executable (string-append directory "/bin/guix")))
+         (if command-line
+             (apply execl (cons* executable executable command-line))
+             (format #t "~a\n" directory)))))))

base-commit: ef525ba96f04c6b3a5e45ab5333c9f440df81e5f
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-10-07 10:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01 13:54 [bug#72928] [PATCH] time-machine: Print profile path if no command is given Tomas Volf
2024-09-09 14:40 ` Ludovic Courtès
2024-09-15 20:38   ` Tomas Volf
2024-09-15 21:29     ` Ludovic Courtès
2024-09-20 15:49       ` Simon Tournier
2024-09-22 14:09         ` Tomas Volf
2024-09-26 15:59           ` Simon Tournier
2024-10-04 15:45     ` Ludovic Courtès
2024-10-06 13:23 ` [bug#72928] [PATCH v2] " Tomas Volf
2024-10-07  9:56   ` bug#72928: " Ludovic Courtès
2024-10-07  9:59   ` [bug#72928] " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).