GNU bug report logs -
#66358
Some options are really subcommands + ignore arguments
Previous Next
Full log
View this message in rfc822 format
retitle 66358 ‘guix archive --{authorize,import,…}’ are really
subcommands + ignore some arguments
thanks
Hi Daniel,
The error is correct, so I sure hope it's reproducible!
Later options cancel out previous ones, so your ‘--authorize’ action
takes precedence over ‘--import’. You're passing it a binary .nar
archive as a private key (which is an s-expression).
Boom.
Instead:
1. guix archive --export hello > hello.nar
2. guix archive --authorize < export-host.private-key
3. guix archive --import < hello.nar
Note that you had an extra ‘hello’ in your --import command as well.
Please note that it does nothing. Option parsing in Guix is
surprisingly lax.
I started thinking about a nice way to make ‘--action’ options mutually
exclusive, but reconsidered. I think it would violate POLA if not
POSIX.
I think it would be less surprising if these ‘single, mutually exclusive
actions’ should always be (sub)subcommands, e.g., ‘guix archive import’,
‘guix archive authorize’, …
I don't know if that change is still worth making here.
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
This bug report was last modified 1 year and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.