From: Tobias Geerinckx-Rice via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Perry, Daniel J" <dperry45@gatech.edu>
Cc: control@debbugs.gnu.org, 66358@debbugs.gnu.org
Subject: bug#66358: Can't import package using archive command
Date: Mon, 09 Oct 2023 14:25:51 +0200 [thread overview]
Message-ID: <74541e429369739b82716cd72ee3b511@tobias.gr> (raw)
In-Reply-To: <BLAPR07MB82894BA6CA6336CE4EE3EB77B5CAA@BLAPR07MB8289.namprd07.prod.outlook.com>
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.
next prev parent reply other threads:[~2023-10-09 12:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 3:35 bug#66358: Can't import package using archive command Perry, Daniel J
2023-10-09 12:25 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix [this message]
2023-10-11 23:27 ` Simon Tournier
2023-10-24 14:48 ` bug#66358: Some options are really subcommands + ignore arguments Maxim Cournoyer
2023-10-24 16:39 ` Simon Tournier
2023-10-09 12:32 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-10-09 16:52 ` bug#66358: Now what about firmware? Perry, Daniel J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74541e429369739b82716cd72ee3b511@tobias.gr \
--to=bug-guix@gnu.org \
--cc=66358@debbugs.gnu.org \
--cc=control@debbugs.gnu.org \
--cc=dperry45@gatech.edu \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).