diff options
author | Christian Hesse <mail@eworm.de> | 2019-10-07 16:00:56 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-10-09 07:39:22 +0200 |
commit | 379f7151056e804ba61caa6c72407ffa79c6649a (patch) | |
tree | c8aab7ac9ec165fd844754426b11b916605abd65 | |
parent | d5c3ed129c80c7a0676994d06c140f5e67b8b07d (diff) | |
download | pacman-379f7151056e804ba61caa6c72407ffa79c6649a.tar.gz pacman-379f7151056e804ba61caa6c72407ffa79c6649a.tar.xz |
signing: modify question text with unknwon uid
If the key's uid is unknown (for example with db signatures) the
question was:
:: Import PGP key 02FD1C7A934E614545849F19A6234074498E9CEE, "(null)"? [Y/n]
Let's display a modified question for unknown uid.
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | src/pacman/callback.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 25528100..f40f2d47 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -456,8 +456,14 @@ void cb_question(alpm_question_t *question) case ALPM_QUESTION_IMPORT_KEY: { alpm_question_import_key_t *q = &question->import_key; - q->import = yesno(_("Import PGP key %s, \"%s\"?"), - q->key->fingerprint, q->key->uid); + /* the uid is unknown with db signatures */ + if (q->key->uid == NULL) { + q->import = yesno(_("Import PGP key %s?"), + q->key->fingerprint); + } else { + q->import = yesno(_("Import PGP key %s, \"%s\"?"), + q->key->fingerprint, q->key->uid); + } } break; } |