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 1RAxmM-0007CB-09 for garchives@archives.gentoo.org; Tue, 04 Oct 2011 05:42:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0072921C23D; Tue, 4 Oct 2011 05:42:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C215F21C23D for ; Tue, 4 Oct 2011 05:42:50 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4C1321B401F for ; Tue, 4 Oct 2011 05:42:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5A24F80042 for ; Tue, 4 Oct 2011 05:42:49 +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: <12cf3eb1397dc2b33b087f6e37878d94a15a6b9f.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: 12cf3eb1397dc2b33b087f6e37878d94a15a6b9f Date: Tue, 4 Oct 2011 05:42:49 +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: X-Archives-Hash: e0ef1b3a33af1c2e507b0a19ee5baa1d commit: 12cf3eb1397dc2b33b087f6e37878d94a15a6b9f Author: Zac Medico gentoo org> AuthorDate: Tue Oct 4 05:42:22 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 4 05:42:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D12cf3eb1 repoman: bail out if unsupported manifest-hashes --- bin/repoman | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/bin/repoman b/bin/repoman index 711fce9..7943f54 100755 --- a/bin/repoman +++ b/bin/repoman @@ -587,6 +587,31 @@ manifest_hashes =3D repo_config.manifest_hashes if manifest_hashes is None: manifest_hashes =3D portage.const.MANIFEST2_HASH_DEFAULTS =20 +if options.mode in ("commit", "fix", "manifest"): + if portage.const.MANIFEST2_REQUIRED_HASH not in manifest_hashes: + msg =3D ("The 'manifest-hashes' setting in the '%s' repository's " + "metadata/layout.conf does not contain the '%s' hash which " + "is required by this portage version. You will have to " + "upgrade portage if you want to generate valid manifests for " + "this repository.") % \ + (repo_config.name, portage.const.MANIFEST2_REQUIRED_HASH) + for line in textwrap.wrap(msg, 70): + logging.error(line) + sys.exit(1) + + unsupported_hashes =3D manifest_hashes.difference( + portage.const.MANIFEST2_HASH_FUNCTIONS) + if unsupported_hashes: + msg =3D ("The 'manifest-hashes' setting in the '%s' repository's " + "metadata/layout.conf contains one or more hash types '%s' " + "which are not supported by this portage version. You will " + "have to upgrade portage if you want to generate valid " + "manifests for this repository.") % \ + (repo_config.name, " ".join(sorted(unsupported_hashes))) + for line in textwrap.wrap(msg, 70): + logging.error(line) + sys.exit(1) + if "commit" =3D=3D options.mode and \ repo_config.name =3D=3D "gentoo" and \ "RMD160" in manifest_hashes and \