`guix deploy` doesn't recognize option --dry-run

  • Done
  • quality assurance status badge
Details
4 participants
  • Jesse Gibbons
  • Ludovic Courtès
  • Maxim Cournoyer
  • zimoun
Owner
unassigned
Submitted by
Jesse Gibbons
Severity
normal
Merged with
J
J
Jesse Gibbons wrote on 26 Nov 2020 21:11
(address . bug-guix@gnu.org)
33204938-938e-a699-85c0-89c97bbf09b6@gmail.com
--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
Z
Z
zimoun wrote on 28 Nov 2020 11:48
867dq5rc37.fsf@gmail.com
Dear,

Thank you for the report.

On Thu, 26 Nov 2020 at 13:11, Jesse Gibbons <jgibbons2357@gmail.com> wrote:
Toggle quote (6 lines)
> --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:

Toggle snippet (13 lines)
(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))))))))

So most of them should work, could you confirm?


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


All the best,
simon
M
M
Maxim Cournoyer wrote on 30 Nov 2020 04:49
control message for bug #44893
(address . control@debbugs.gnu.org)
87mtyzmrm9.fsf@gmail.com
merge 44893 41945
quit
L
L
Ludovic Courtès wrote on 5 Dec 2020 15:24
Re: bug#44893: `guix deploy` doesn't recognize option --dry-run
(name . zimoun)(address . zimon.toutoune@gmail.com)
87r1o472lo.fsf@gnu.org
Hi,

We can make this change:
Toggle diff (15 lines)
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?

Ludo’.
M
M
Maxim Cournoyer wrote on 25 Jul 2022 14:31
(name . Ludovic Courtès)(address . ludo@gnu.org)
871qu99xvt.fsf@gmail.com
Hi,

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

Toggle quote (26 lines)
> 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
Closed
?