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 F1502139694 for ; Sun, 6 Aug 2017 06:54:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4FFBAE0D4E; Sun, 6 Aug 2017 06:54:24 +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 32611E0D4E for ; Sun, 6 Aug 2017 06:54:24 +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 6C9683417C8 for ; Sun, 6 Aug 2017 06:54:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3241074FA for ; Sun, 6 Aug 2017 06:54:22 +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: <1502002456.a6c0a4d46a99b36cfef40e091d531ff7d0685918.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:repoman 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: a6c0a4d46a99b36cfef40e091d531ff7d0685918 X-VCS-Branch: repoman Date: Sun, 6 Aug 2017 06:54:22 +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: 11ebc6d7-5c7e-4d33-a386-18fefacda923 X-Archives-Hash: 4fea78ad33491616c639d29fef4c9d7f commit: a6c0a4d46a99b36cfef40e091d531ff7d0685918 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:16 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a6c0a4d4 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: