From: Zac Medico Date: Tue, 19 Mar 2013 19:55:50 +0000 (-0700) Subject: repoman: export GNUPGHOME to git, bug #462362 X-Git-Tag: v2.2.0_alpha167~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9ba030a67ca69af791af8370837dfddf2f2f7b1;p=portage.git repoman: export GNUPGHOME to git, bug #462362 --- diff --git a/bin/repoman b/bin/repoman index 8c49c06e5..a2be38008 100755 --- a/bin/repoman +++ b/bin/repoman @@ -595,6 +595,7 @@ repodir = os.path.realpath(portdir_overlay) repo_config = repoman_settings.repositories.get_repo_for_location(repodir) portdb.porttrees = list(repo_config.eclass_db.porttrees) portdir = portdb.porttrees[0] +commit_env = os.environ.copy() if repo_config.allow_provide_virtual: qawarnings.add("virtual.oldstyle") @@ -605,6 +606,9 @@ if repo_config.sign_commit: # the commit arguments. If key_id is unspecified, then it must be # configured by `git config user.signingkey key_id`. vcs_local_opts.append("--gpg-sign") + if repoman_settings.get("PORTAGE_GPG_DIR"): + # Pass GNUPGHOME to git for bug #462362. + commit_env["GNUPGHOME"] = repoman_settings["PORTAGE_GPG_DIR"] # In order to disable manifest signatures, repos may set # "sign-manifests = false" in metadata/layout.conf. This @@ -2855,7 +2859,7 @@ else: if options.pretend: print("(%s)" % (" ".join(commit_cmd),)) else: - retval = spawn(commit_cmd, env=os.environ) + retval = spawn(commit_cmd, env=commit_env) if retval != os.EX_OK: writemsg_level(("!!! Exiting on %s (shell) " + \ "error code: %s\n") % (vcs, retval), @@ -3026,7 +3030,7 @@ else: if options.pretend: print("(%s)" % (" ".join(commit_cmd),)) else: - retval = spawn(commit_cmd, env=os.environ) + retval = spawn(commit_cmd, env=commit_env) if retval != os.EX_OK: if repo_config.sign_commit and vcs == 'git' and \ not git_supports_gpg_sign():