diff options
author | Jonas Witschel <diabonas@archlinux.org> | 2019-10-02 16:40:54 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-10-07 03:07:39 +0200 |
commit | 80e2e1c7c9f2cc2795f497f2101b0aeb7b7e8638 (patch) | |
tree | d890a6b126de7dcb68a49d4783a0351dec56024b /src | |
parent | 0c4a8ae24b8395b0dd4f8046615336e394a8e3f8 (diff) | |
download | pacman-80e2e1c7c9f2cc2795f497f2101b0aeb7b7e8638.tar.gz pacman-80e2e1c7c9f2cc2795f497f2101b0aeb7b7e8638.tar.xz |
signing: move key import confirmation before key_search
Ask the user whether they want to import a missing key before even doing
a search on the keyserver. This will be useful for getting Web Key
Directory support in place: for a WKD, looking up and importing a key
are a single action, so the current key_search -> QUESTION -> key_import
workflow does not apply.
Since only the ID of the package signing key is available before
key_search, we display the packager variable in addition to the key ID
for user convenience.
Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/callback.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index fc4ce875..25528100 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -456,17 +456,8 @@ void cb_question(alpm_question_t *question) case ALPM_QUESTION_IMPORT_KEY: { alpm_question_import_key_t *q = &question->import_key; - char created[12]; - time_t time = (time_t)q->key->created; - strftime(created, 12, "%Y-%m-%d", localtime(&time)); - - if(q->key->revoked) { - q->import = yesno(_("Import PGP key %u%c/%s, \"%s\", created: %s (revoked)?"), - q->key->length, q->key->pubkey_algo, q->key->fingerprint, q->key->uid, created); - } else { - q->import = yesno(_("Import PGP key %u%c/%s, \"%s\", created: %s?"), - q->key->length, q->key->pubkey_algo, q->key->fingerprint, q->key->uid, created); - } + q->import = yesno(_("Import PGP key %s, \"%s\"?"), + q->key->fingerprint, q->key->uid); } break; } |