signing: delay gpgme_init() until latest possible moment
commit2a18171afa9ba8acf1123355f252b1189aefeeeb
authorDan McGee <dan@archlinux.org>
Mon, 3 Oct 2011 15:52:16 +0000 (3 10:52 -0500)
committerDan McGee <dan@archlinux.org>
Wed, 12 Oct 2011 19:20:47 +0000 (12 14:20 -0500)
treea44468c6b6d2a28fae8310a2bc1f29df102bf6ab
parent61c6ae01b3315c5db38ef5d313ac6f0b75fe2209
signing: delay gpgme_init() until latest possible moment

In the default configuration, we can enter the signing code but still
have nothing to do with GPGME- for example, if database signatures are
optional but none are present. Delay initialization of GPGME until we
know there is a signature file present or we were passed base64-encoded
data.

This also makes debugging with valgrind a lot easier as you don't have
to deal with all the GPGME error noise because their code leaks like a
sieve.

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/signing.c