Refactor PORTAGE_GPG_KEY.
authorRobin H. Johnson <robbat2@gentoo.org>
Mon, 22 Apr 2013 23:08:50 +0000 (23:08 +0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 23 Apr 2013 02:49:24 +0000 (19:49 -0700)
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
bin/repoman

index b9486315903a39d72226e2276d4b3edbd24e2719..c419c6fdc010dae886ba2b15d8077093de44359c 100755 (executable)
@@ -2658,6 +2658,7 @@ else:
        commitmessage = commitmessage.rstrip()
        changelog_msg = commitmessage
        portage_version = getattr(portage, "VERSION", None)
+       gpg_key = repoman_settings.get("PORTAGE_GPG_KEY", "")
        if portage_version is None:
                sys.stderr.write("Failed to insert portage version in message!\n")
                sys.stderr.flush()
@@ -2669,8 +2670,7 @@ else:
                if options.force:
                        commit_footer += "\nRepoMan-Options: --force"
                if sign_manifests:
-                       commit_footer += "\nManifest-Sign-Key: %s" % \
-                               repoman_settings.get("PORTAGE_GPG_KEY", "")
+                       commit_footer += "\nManifest-Sign-Key: %s" % (gpg_key, )
        else:
                unameout = platform.system() + " "
                if platform.system() in ["Darwin", "SunOS"]:
@@ -2683,7 +2683,7 @@ else:
                        commit_footer += ", RepoMan options: --force"
                if sign_manifests:
                        commit_footer += ", signed Manifest commit with key %s" % \
-                               repoman_settings.get("PORTAGE_GPG_KEY", "")
+                               (gpg_key, )
                else:
                        commit_footer += ", unsigned Manifest commit"
                commit_footer += ")"