repoman: identical Manifest commit message
authorZac Medico <zmedico@gentoo.org>
Sun, 14 Oct 2012 19:48:35 +0000 (12:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 14 Oct 2012 19:48:35 +0000 (12:48 -0700)
Include the signed/unsigned part it the initial commit message,
so that it's identical to the Manifest commit message. See
bug #437546, comment #3.

bin/repoman

index ecf1bd251c4d25e1bcba4576bfbe9bb203d36f88..edd76493596ba3ef5706441eb32d988ef90e82ba 100755 (executable)
@@ -2533,6 +2533,11 @@ else:
                (portage_version, vcs, unameout)
        if options.force:
                commitmessage += ", RepoMan options: --force"
+       if sign_manifests:
+               commitmessage += ", signed Manifest commit with key %s" % \
+                       repoman_settings["PORTAGE_GPG_KEY"]
+       else:
+               commitmessage += ", unsigned Manifest commit"
        commitmessage += ")"
 
        if options.echangelog in ('y', 'force'):
@@ -2859,14 +2864,7 @@ else:
 
                fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
                mymsg = os.fdopen(fd, "wb")
-               # strip the closing parenthesis
-               mymsg.write(_unicode_encode(commitmessage[:-1]))
-               if signed:
-                       mymsg.write(_unicode_encode(
-                               ", signed Manifest commit with key %s)" % \
-                               repoman_settings["PORTAGE_GPG_KEY"]))
-               else:
-                       mymsg.write(b", unsigned Manifest commit)")
+               mymsg.write(_unicode_encode(commitmessage))
                mymsg.close()
 
                commit_cmd = []