[pacman-dev] [PATCH] Add compatibility with gpgme-1.5.0
Allan McRae
allan at archlinux.org
Sun Jun 1 20:32:16 EDT 2014
On 02/06/14 10:27, Allan McRae wrote:
> On 02/06/14 10:13, Dave Reisner wrote:
>> On Sun, Jun 01, 2014 at 06:56:01PM -0500, Dan McGee wrote:
>>> On Sun, Jun 1, 2014 at 6:44 PM, Allan McRae <allan at archlinux.org> wrote:
>>>
>>>> Signed-off-by: Allan McRae <allan at archlinux.org>
>>>> ---
>>>> lib/libalpm/signing.c | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
>>>> index caacd24..b14945b 100644
>>>> --- a/lib/libalpm/signing.c
>>>> +++ b/lib/libalpm/signing.c
>>>> @@ -342,6 +342,7 @@ static int key_search(alpm_handle_t *handle, const
>>>> char *fpr,
>>>> case GPGME_PK_ELG:
>>>> case GPGME_PK_ECDSA:
>>>> case GPGME_PK_ECDH:
>>>>
>>> #ifdef GPGME_PK_ECC
>>>
>>>> + case GPGME_PK_ECC:
>>>>
>>> #endif
>>>
>>> Worth it for backward compat?
>>>
>>
>> This doesn't work, since GPGME_PK_ECC is part of an enum, and not a
>> preprocessor definition.
>>
>
> Yeah - it requires autoconf magic using gpgme_check_version. I will
> post a working patch later.
>
Or I could read the header... Here is the updated patch:
@@ -342,6 +342,10 @@ static int key_search(alpm_handle_t *handle, const
char *fpr,
case GPGME_PK_ELG:
case GPGME_PK_ECDSA:
case GPGME_PK_ECDH:
+/* value added in gpgme 1.5.0 */
+#if GPGME_VERSION_NUMBER >= 0x010500
+ case GPGME_PK_ECC:
+#endif
pgpkey->pubkey_algo = 'E';
break;
}
More information about the pacman-dev
mailing list