commit: 2011a7f77bd229afed7b3f92ae036ff7323ed03b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 3 13:52:53 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug 6 06:54:01 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2011a7f7
repoman commit: Merge code generating common part of the footer (DCO)
The DCO Signed-off-by footer looks the same on the git branch, and on
the branch for other VCS-es. Therefore, move the code generating it
above the split branches. This also prepares the code for further footer
elements being added.
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
repoman/pym/repoman/actions.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 73b44c5f5..00bb5b2ca 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -342,25 +342,26 @@ class Actions(object):
sys.stderr.write("Failed to insert portage version in
message!\n")
sys.stderr.flush()
portage_version = "Unknown"
+
+ # Common part of commit footer
+ commit_footer = "\n"
+ if dco_sob:
+ commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
+
# Use new footer only for git (see bug #438364).
if self.vcs_settings.vcs in ["git"]:
- commit_footer = "\nPackage-Manager: Portage-%s,
Repoman-%s" % (
+ commit_footer += "Package-Manager: Portage-%s,
Repoman-%s" % (
portage.VERSION,
VERSION)
if report_options:
commit_footer += "\nRepoMan-Options: " + "
".join(report_options)
if self.repo_settings.sign_manifests:
commit_footer += "\nManifest-Sign-Key: %s" %
(gpg_key, )
- if dco_sob:
- commit_footer += "\nSigned-off-by: %s" %
(dco_sob, )
else:
unameout = platform.system() + " "
if platform.system() in ["Darwin", "SunOS"]:
unameout += platform.processor()
else:
unameout += platform.machine()
- commit_footer = "\n"
- if dco_sob:
- commit_footer += "Signed-off-by: %s\n" %
(dco_sob, )
commit_footer += "(Portage version: %s/%s/%s" % \
(portage_version, self.vcs_settings.vcs,
unameout)
if report_options: