repoman: export GPG_TTY for bug #477728
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Jul 2013 22:28:40 +0000 (15:28 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Jul 2013 22:28:40 +0000 (15:28 -0700)
bin/repoman

index bbade951126a7d6a437de5d4a444456629a1d11b..52234398026c679d6df8bed9182d428ee4d8bf63 100755 (executable)
@@ -638,6 +638,12 @@ if repo_config.sign_commit:
                        # Pass GNUPGHOME to git for bug #462362.
                        commit_env["GNUPGHOME"] = repoman_settings["PORTAGE_GPG_DIR"]
 
+               # Pass GPG_TTY to git for bug #477728.
+               try:
+                       commit_env["GPG_TTY"] = os.ttyname(sys.stdin.fileno())
+               except OSError:
+                       pass
+
 # In order to disable manifest signatures, repos may set
 # "sign-manifests = false" in metadata/layout.conf. This
 # can be used to prevent merge conflicts like those that