unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44893: `guix deploy` doesn't recognize option --dry-run
@ 2020-11-26 20:11 Jesse Gibbons
  2020-11-28 10:48 ` zimoun
  0 siblings, 1 reply; 4+ messages in thread
From: Jesse Gibbons @ 2020-11-26 20:11 UTC (permalink / raw)
  To: 44893

--dry-run is an option listed in `guix deploy --help` but when I try it, 
it isn't recognized:

$ guix deploy --dry-run deploy.scm
guix deploy: error: dry-run: unrecognized option






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

* bug#44893: `guix deploy` doesn't recognize option --dry-run
  2020-11-26 20:11 bug#44893: `guix deploy` doesn't recognize option --dry-run Jesse Gibbons
@ 2020-11-28 10:48 ` zimoun
  2020-12-05 14:24   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: zimoun @ 2020-11-28 10:48 UTC (permalink / raw)
  To: Jesse Gibbons, 44893

Dear,

Thank you for the report.

On Thu, 26 Nov 2020 at 13:11, Jesse Gibbons <jgibbons2357@gmail.com> wrote:
> --dry-run is an option listed in `guix deploy --help` but when I try it, 
> it isn't recognized:
>
> $ guix deploy --dry-run deploy.scm
> guix deploy: error: dry-run: unrecognized option

Yeah, it is because ’show-build-options-help’ is used.  I am not using
“guix deploy” and the question is: are all the build options working?

The build options of ’show-build-options-help’ are:

  -L, --load-path=DIR    prepend DIR to the package module search path
  -K, --keep-failed      keep build tree of failed builds
  -k, --keep-going       keep going when some of the derivations fail
  -n, --dry-run          do not build the derivations
      --fallback         fall back to building when the substituter fails
      --no-substitutes   build instead of resorting to pre-built substitutes
      --substitute-urls=URLS
                         fetch substitute from URLS if they are authorized
      --no-grafts        do not graft packages
      --no-offload       do not attempt to offload builds
      --max-silent-time=SECONDS
                         mark the build as failed after SECONDS of silence
      --timeout=SECONDS  mark the build as failed after SECONDS of activity
      --rounds=N         build N times in a row to detect non-determinism
  -c, --cores=N          allow the use of up to N CPU cores for the build
  -M, --max-jobs=N       allow at most N build jobs
      --debug=LEVEL      produce debugging output at LEVEL

The relevant piece of code is:

--8<---------------cut here---------------start------------->8---
      (with-status-verbosity (assoc-ref opts 'verbosity)
        (with-store store
          (set-build-options-from-command-line store opts)
          (with-build-handler (build-notifier #:use-substitutes?
                                              (assoc-ref opts 'substitutes?)
                                              #:verbosity
                                              (assoc-ref opts 'verbosity))
            (parameterize ((%graft? (assq-ref opts 'graft?)))
              (map/accumulate-builds store
                                     (cut deploy-machine* store <>)
                                     machines))))))))
--8<---------------cut here---------------end--------------->8---

So most of them should work, could you confirm?


What --dry-run should do in the case of “guix deploy”?


All the best,
simon




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

* bug#44893: `guix deploy` doesn't recognize option --dry-run
  2020-11-28 10:48 ` zimoun
@ 2020-12-05 14:24   ` Ludovic Courtès
  2022-07-25 12:31     ` Maxim Cournoyer
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-12-05 14:24 UTC (permalink / raw)
  To: zimoun; +Cc: Jesse Gibbons, 44893

[-- Attachment #1: Type: text/plain, Size: 31 bytes --]

Hi,

We can make this change:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 889 bytes --]

diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 0725fba54b..d9371b3d4a 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -165,7 +165,9 @@ Perform the deployment specified by FILE.\n"))
           (with-build-handler (build-notifier #:use-substitutes?
                                               (assoc-ref opts 'substitutes?)
                                               #:verbosity
-                                              (assoc-ref opts 'verbosity))
+                                              (assoc-ref opts 'verbosity)
+                                              #:dry-run?
+                                              (assoc-ref opts 'dry-run?))
             (parameterize ((%graft? (assq-ref opts 'graft?)))
               (map/accumulate-builds store
                                      (cut deploy-machine* store <>)

[-- Attachment #3: Type: text/plain, Size: 179 bytes --]


It may not be the kind of “dry run” that users have in mind for ‘guix
deploy’, as you note zimoun, but that’s probably better than nothing.

Thoughts?

Ludo’.

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

* bug#44893: `guix deploy` doesn't recognize option --dry-run
  2020-12-05 14:24   ` Ludovic Courtès
@ 2022-07-25 12:31     ` Maxim Cournoyer
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2022-07-25 12:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 44893-done, Jesse Gibbons, zimoun

Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> We can make this change:
>
> diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
> index 0725fba54b..d9371b3d4a 100644
> --- a/guix/scripts/deploy.scm
> +++ b/guix/scripts/deploy.scm
> @@ -165,7 +165,9 @@ Perform the deployment specified by FILE.\n"))
>            (with-build-handler (build-notifier #:use-substitutes?
>                                                (assoc-ref opts 'substitutes?)
>                                                #:verbosity
> -                                              (assoc-ref opts 'verbosity))
> +                                              (assoc-ref opts 'verbosity)
> +                                              #:dry-run?
> +                                              (assoc-ref opts 'dry-run?))
>              (parameterize ((%graft? (assq-ref opts 'graft?)))
>                (map/accumulate-builds store
>                                       (cut deploy-machine* store <>)
>
>
> It may not be the kind of “dry run” that users have in mind for ‘guix
> deploy’, as you note zimoun, but that’s probably better than nothing.
>
> Thoughts?

I see such a fix was pushed as ff94f9dfde; closing!

Thank you,

Maxim




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

end of thread, other threads:[~2022-07-25 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 20:11 bug#44893: `guix deploy` doesn't recognize option --dry-run Jesse Gibbons
2020-11-28 10:48 ` zimoun
2020-12-05 14:24   ` Ludovic Courtès
2022-07-25 12:31     ` Maxim Cournoyer

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).