FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-20-2011, 10:25 PM
Dan McGee
 
Default Add new import key question enum value and stub frontend function

This is for eventual use by the PGP key import code. Breaking this into
a separate commit now makes the following patches a bit easier to
understand.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/alpm.h | 1 +
src/pacman/callback.c | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 9fe8034..853cb8b 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -352,6 +352,7 @@ typedef enum _alpm_question_t {
ALPM_QUESTION_LOCAL_NEWER = (1 << 4),
ALPM_QUESTION_REMOVE_PKGS = (1 << 5),
ALPM_QUESTION_SELECT_PROVIDER = (1 << 6),
+ ALPM_QUESTION_IMPORT_KEY = (1 << 7)
} alpm_question_t;

/** Question callback */
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index a01fc07..9d4663a 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -342,6 +342,15 @@ void cb_question(alpm_question_t event, void *data1, void *data2,
(char *)data1,
alpm_strerror(*(enum _alpm_errno_t *)data2));
break;
+ case ALPM_QUESTION_IMPORT_KEY:
+ {
+ alpm_pgpkey_t *key = data1;
+ char created[12];
+ strftime(created, 12, "%Y-%m-%d", localtime(&(key->created)));
+ *response = yesno(_(":: Import PGP key %s, "%s", created %s?"),
+ key->fingerprint, key->uid, created);
+ }
+ break;
}
if(config->noask) {
if(config->ask & event) {
--
1.7.6.3
 

Thread Tools




All times are GMT. The time now is 04:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org