@Duncaen Ah that's a good point, and almost was part of my question in a previous edit. I guess that a bootstrap script should have its own way of verifying the key (and perhaps asking the user upfront, even if the actual bootstrap will be done at a later time).
We should always ask this question. Regardless of -y.
Nevertheless we should test for isatty and asume "no" if stdin isn't a tty. This prevents automatic scripts from hanging.
For automatic installs, you should place the key in the right directory (/var/db/xbps/keys) before starting any installation.
Hi!
While adding support for creating Void Linux chroots to `directory-bootstrap` of image-bootstrap (in https://github.com/hartwork/image-bootstrap/commit/ff46179698babcea0c51e52e6ffb2dac8782b08e) I came across this very issue (and happily confirm the advertised workaround to be working).
I would like to vote for not proceeding with key import unasked for security *while* keeping `--yes` fully non-interactive, as advertised. In my mind, aborting with an error that `--yes` requires the key put in place, would work best: It would allow calling tools to pass a tty that they need for themselves, without applying tricks to call xbps in non-tty mode. Thanks!
PS: @Gottox, we just had a quick chat at the Void Linux assembly at 34c3 on that topic.