1 |
The DCO Signed-off-by footer looks the same on the git branch, and on |
2 |
the branch for other VCS-es. Therefore, move the code generating it |
3 |
above the split branches. This also prepares the code for further footer |
4 |
elements being added. |
5 |
--- |
6 |
repoman/pym/repoman/actions.py | 13 +++++++------ |
7 |
1 file changed, 7 insertions(+), 6 deletions(-) |
8 |
|
9 |
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py |
10 |
index 73b44c5f5..00bb5b2ca 100644 |
11 |
--- a/repoman/pym/repoman/actions.py |
12 |
+++ b/repoman/pym/repoman/actions.py |
13 |
@@ -342,25 +342,26 @@ class Actions(object): |
14 |
sys.stderr.write("Failed to insert portage version in message!\n") |
15 |
sys.stderr.flush() |
16 |
portage_version = "Unknown" |
17 |
+ |
18 |
+ # Common part of commit footer |
19 |
+ commit_footer = "\n" |
20 |
+ if dco_sob: |
21 |
+ commit_footer += "Signed-off-by: %s\n" % (dco_sob, ) |
22 |
+ |
23 |
# Use new footer only for git (see bug #438364). |
24 |
if self.vcs_settings.vcs in ["git"]: |
25 |
- commit_footer = "\nPackage-Manager: Portage-%s, Repoman-%s" % ( |
26 |
+ commit_footer += "Package-Manager: Portage-%s, Repoman-%s" % ( |
27 |
portage.VERSION, VERSION) |
28 |
if report_options: |
29 |
commit_footer += "\nRepoMan-Options: " + " ".join(report_options) |
30 |
if self.repo_settings.sign_manifests: |
31 |
commit_footer += "\nManifest-Sign-Key: %s" % (gpg_key, ) |
32 |
- if dco_sob: |
33 |
- commit_footer += "\nSigned-off-by: %s" % (dco_sob, ) |
34 |
else: |
35 |
unameout = platform.system() + " " |
36 |
if platform.system() in ["Darwin", "SunOS"]: |
37 |
unameout += platform.processor() |
38 |
else: |
39 |
unameout += platform.machine() |
40 |
- commit_footer = "\n" |
41 |
- if dco_sob: |
42 |
- commit_footer += "Signed-off-by: %s\n" % (dco_sob, ) |
43 |
commit_footer += "(Portage version: %s/%s/%s" % \ |
44 |
(portage_version, self.vcs_settings.vcs, unameout) |
45 |
if report_options: |
46 |
-- |
47 |
2.13.4 |