From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S4M7a-0004Ah-1Z for garchives@archives.gentoo.org; Mon, 05 Mar 2012 00:49:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B821AE05EF; Mon, 5 Mar 2012 00:49:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7A0DAE05EF for ; Mon, 5 Mar 2012 00:49:39 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CB7EE64204 for ; Mon, 5 Mar 2012 00:49:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E132CE5401 for ; Mon, 5 Mar 2012 00:49:36 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1330908521.350c094fd54644cbb49bcf8d483a75eb22cb4b6e.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/repoman X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 350c094fd54644cbb49bcf8d483a75eb22cb4b6e X-VCS-Branch: master Date: Mon, 5 Mar 2012 00:49:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a4ee03f6-a7fc-4c2a-a4ee-293a0aacd3bb X-Archives-Hash: 799509487fb76943b4d1799082e264d5 commit: 350c094fd54644cbb49bcf8d483a75eb22cb4b6e Author: Zac Medico gentoo org> AuthorDate: Mon Mar 5 00:48:41 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Mar 5 00:48:41 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D350c094f repoman: say Git >=3D1.7.9 needed for signed commit --- bin/repoman | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/bin/repoman b/bin/repoman index bcb48e4..d430a6d 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1,5 +1,5 @@ #!/usr/bin/python -O -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 # Next to do: dep syntax checking in mask files @@ -936,6 +936,20 @@ def vcs_files_to_cps(vcs_file_iter): =20 return frozenset(modified_cps) =20 +def git_supports_gpg_sign(): + status, cmd_output =3D \ + subprocess_getstatusoutput("git --version") + cmd_output =3D cmd_output.split() + if cmd_output: + version =3D re.match(r'^(\d*)\.(\d*)\.(\d*)', cmd_output[-1]) + if version is not None: + version =3D [int(x) for x in version.groups()[1:]] + if version[0] > 1 or \ + (version[0] =3D=3D 1 and version[1] > 7) or \ + (version[0] =3D=3D 1 and version[1] =3D=3D 7 and version[2] >=3D 9): + return True + return False + def dev_keywords(profiles): """ Create a set of KEYWORDS values that exist in 'dev' @@ -2772,6 +2786,13 @@ else: else: retval =3D spawn(commit_cmd, env=3Dos.environ) if retval !=3D os.EX_OK: + + if repo_config.sign_commit and vcs =3D=3D 'git' and \ + not git_supports_gpg_sign(): + # Inform user that newer git is needed (bug #403323). + logging.error( + "Git >=3D1.7.9 is required for signed commits!") + writemsg_level(("!!! Exiting on %s (shell) " + \ "error code: %s\n") % (vcs, retval), level=3Dlogging.ERROR, noiselevel=3D-1)