Comment 4 for bug 847388

Revision history for this message
Curtis Hovey (sinzui) wrote :

I think --no-tty is always safe to run.

I have been exploring a work around for bug 436874 which might be considered a dupe of this bug. My case is
    Gedit started from launcher > GDP Bazaar > bzr-gtk > bzr
which always fails because there in no tty. Setting up a pty and setting GPG_TTY in the env fails.

I tested the call to gpg in a subprocess in GDP Bazaar to reproduce the error in bzrlib.gpg, then added the --no-tty arg. We always get the stdout, stderr, and returncode. I think this is hamless to add in all posix OSes, maybe win32 as well.

My current hack to do a commit without starting gedit from the terminal is to use this file as my gpg command
    #!/bin/bash
    gpg --no-tty $@

I contemplated making a fix in bzr-gtk to add the --no-tty arg, but that will also require a change to bzrlib.gpg to split the gpg_signing_command value, which must also consider that there might be spaces in the dirnames. bzr-gtk could monkeypatch the GPGStrategy._command_line, but that is naughty. If --no-tty is not considered safe for bzrlib.gpg, then bzr-gtk would want a way to provide it's own GPGStrategy with it's own _command_line prop.