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>
This commit is contained in:
Christian Hesse 2019-10-07 16:00:56 +02:00 committed by Allan McRae
parent d5c3ed129c
commit 379f715105

View file

@ -456,9 +456,15 @@ void cb_question(alpm_question_t *question)
case ALPM_QUESTION_IMPORT_KEY:
{
alpm_question_import_key_t *q = &question->import_key;
/* 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;
}
if(config->noask) {