From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DB348139694 for ; Sun, 6 Aug 2017 06:54:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33B4CE0D49; Sun, 6 Aug 2017 06:54:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 162B5E0D49 for ; Sun, 6 Aug 2017 06:54:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DFE083417C8 for ; Sun, 6 Aug 2017 06:54:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D7FE74FA for ; Sun, 6 Aug 2017 06:54:08 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1502002441.2011a7f77bd229afed7b3f92ae036ff7323ed03b.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: repoman/pym/repoman/actions.py X-VCS-Directories: repoman/pym/repoman/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 2011a7f77bd229afed7b3f92ae036ff7323ed03b X-VCS-Branch: master Date: Sun, 6 Aug 2017 06:54:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0261c830-7994-4606-8b90-a53f4f38eb4a X-Archives-Hash: 358762a34db05361cec9d477fa37e13e commit: 2011a7f77bd229afed7b3f92ae036ff7323ed03b Author: Michał Górny gentoo org> AuthorDate: Thu Aug 3 13:52:53 2017 +0000 Commit: Michał Górny gentoo 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 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: