1 |
commit: 2011a7f77bd229afed7b3f92ae036ff7323ed03b |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 3 13:52:53 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 6 06:54:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2011a7f7 |
7 |
|
8 |
repoman commit: Merge code generating common part of the footer (DCO) |
9 |
|
10 |
The DCO Signed-off-by footer looks the same on the git branch, and on |
11 |
the branch for other VCS-es. Therefore, move the code generating it |
12 |
above the split branches. This also prepares the code for further footer |
13 |
elements being added. |
14 |
|
15 |
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org> |
16 |
|
17 |
repoman/pym/repoman/actions.py | 13 +++++++------ |
18 |
1 file changed, 7 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py |
21 |
index 73b44c5f5..00bb5b2ca 100644 |
22 |
--- a/repoman/pym/repoman/actions.py |
23 |
+++ b/repoman/pym/repoman/actions.py |
24 |
@@ -342,25 +342,26 @@ class Actions(object): |
25 |
sys.stderr.write("Failed to insert portage version in message!\n") |
26 |
sys.stderr.flush() |
27 |
portage_version = "Unknown" |
28 |
+ |
29 |
+ # Common part of commit footer |
30 |
+ commit_footer = "\n" |
31 |
+ if dco_sob: |
32 |
+ commit_footer += "Signed-off-by: %s\n" % (dco_sob, ) |
33 |
+ |
34 |
# Use new footer only for git (see bug #438364). |
35 |
if self.vcs_settings.vcs in ["git"]: |
36 |
- commit_footer = "\nPackage-Manager: Portage-%s, Repoman-%s" % ( |
37 |
+ commit_footer += "Package-Manager: Portage-%s, Repoman-%s" % ( |
38 |
portage.VERSION, VERSION) |
39 |
if report_options: |
40 |
commit_footer += "\nRepoMan-Options: " + " ".join(report_options) |
41 |
if self.repo_settings.sign_manifests: |
42 |
commit_footer += "\nManifest-Sign-Key: %s" % (gpg_key, ) |
43 |
- if dco_sob: |
44 |
- commit_footer += "\nSigned-off-by: %s" % (dco_sob, ) |
45 |
else: |
46 |
unameout = platform.system() + " " |
47 |
if platform.system() in ["Darwin", "SunOS"]: |
48 |
unameout += platform.processor() |
49 |
else: |
50 |
unameout += platform.machine() |
51 |
- commit_footer = "\n" |
52 |
- if dco_sob: |
53 |
- commit_footer += "Signed-off-by: %s\n" % (dco_sob, ) |
54 |
commit_footer += "(Portage version: %s/%s/%s" % \ |
55 |
(portage_version, self.vcs_settings.vcs, unameout) |
56 |
if report_options: |