Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Witschel <diabonas@archlinux.org>2019-10-02 16:40:54 +0200
committerAllan McRae <allan@archlinux.org>2019-10-07 11:07:39 +1000
commit80e2e1c7c9f2cc2795f497f2101b0aeb7b7e8638 (patch)
treed890a6b126de7dcb68a49d4783a0351dec56024b /src
parent0c4a8ae24b8395b0dd4f8046615336e394a8e3f8 (diff)
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.c13
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;
}