GNU bug report logs -
#55577
[PATCH] Check substitute --help or --version options early
Previous Next
Reported by: yarl-baudig <at> mailoo.org
Date: Sun, 22 May 2022 14:23:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 27 May 2022 23:36:23 +0200
with message-id <878rqmd5ew.fsf <at> gnu.org>
and subject line Re: bug#55577: [PATCH] Check substitute --help or --version options early
has caused the debbugs.gnu.org bug report #55577,
regarding [PATCH] Check substitute --help or --version options early
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
55577: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55577
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Running `guix archive --authorize` sets /etc/guix/acl to 600
via with-atomic-file-output via mkstemp!.
Then running `guix substitute --help/--version` fails on "permission denied".
While "guix substitute" is an internal tool, the options --help and --version
exist and you should be able to run those from the command line.
* guix/scripts/substitute.scm: earlier check for --help or --version.
---
guix/scripts/substitute.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 908a8334a8..c5f5d23b47 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -704,6 +704,14 @@ (define-command (guix-substitute . args)
(category internal)
(synopsis "implement the build daemon's substituter protocol")
+ (match args
+ ((or ("-V") ("--version"))
+ (show-version-and-exit "guix substitute"))
+ ((or ("-h") ("--help") ())
+ (show-help)
+ (exit 0))
+ (_ #t))
+
(define print-build-trace?
(match (or (find-daemon-option "untrusted-print-extended-build-trace")
(find-daemon-option "print-extended-build-trace"))
@@ -775,10 +783,6 @@ (define reply-port
#:print-build-trace?
print-build-trace?)
(loop))))))
- ((or ("-V") ("--version"))
- (show-version-and-exit "guix substitute"))
- ((or ("-h") ("--help"))
- (show-help))
(opts
(leave (G_ "~a: unrecognized options~%") opts))))))
--
2.36.0
[Message part 3 (message/rfc822, inline)]
Hi,
yarl-baudig <at> mailoo.org skribis:
> Running `guix archive --authorize` sets /etc/guix/acl to 600
> via with-atomic-file-output via mkstemp!.
> Then running `guix substitute --help/--version` fails on "permission denied".
> While "guix substitute" is an internal tool, the options --help and --version
> exist and you should be able to run those from the command line.
>
> * guix/scripts/substitute.scm: earlier check for --help or --version.
Applied, thanks!
Ludo’.
This bug report was last modified 3 years and 81 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.