Comment 6 for bug 44755

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 44755] Re: bzr commit fails when GPG agent is unavailable

On Mon, 2006-05-15 at 21:02 +0000, John Dong wrote:
> http://jdlan.gotdns.org/~jdong/bzr/bzr.dev.gpg-fix/
>
> I wrote up an extremely simple patch to bzr.dev that closes this bug for
> me. It simply checks length of "result" instead of return code to
> determine if a signature failed or succeeded. In my testing, it
> correctly identifies failed and succeeded signings.

From the man page for GPG:

RETURN VALUE
       The program returns 0 if everything was fine, 1 if at least a
signature was bad, and other error codes for fatal errors.

Ignoring this value is cavalier at best.

I am strongly -1 on this patch.

I consider it a bug in gpg that it returns a status of 2 ('some fatal
error' according to the man page) if it can't contact the agent, and I
urge you to file a bug on gpg, perhaps asking for a '--auto-use-agent'
or something, which will not return 2 if the agent is missing.

Rob

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.