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 1RAnKi-0007Kz-FP for garchives@archives.gentoo.org; Mon, 03 Oct 2011 18:33:44 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F2A221C0CC; Mon, 3 Oct 2011 18:33:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DFE4821C0CC for ; Mon, 3 Oct 2011 18:33:36 +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 5B2F81B4002 for ; Mon, 3 Oct 2011 18:33:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A856880042 for ; Mon, 3 Oct 2011 18:33:35 +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: <6a534da500cb95c692993d6348a31d62ec8a152b.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/repository/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/repository/config.py X-VCS-Directories: pym/portage/repository/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 6a534da500cb95c692993d6348a31d62ec8a152b Date: Mon, 3 Oct 2011 18:33:35 +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: 02fed21f9ad4ed8387f97de1f794dc0a commit: 6a534da500cb95c692993d6348a31d62ec8a152b Author: Zac Medico gentoo org> AuthorDate: Mon Oct 3 18:33:08 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Oct 3 18:33:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D6a534da5 Warn for questionable layout.conf manifest-hashes --- pym/portage/repository/config.py | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/co= nfig.py index 779d432..713494c 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -3,6 +3,7 @@ =20 import io import logging +import warnings import sys import re =20 @@ -15,7 +16,8 @@ try: except ImportError: from ConfigParser import SafeConfigParser, ParsingError from portage import os -from portage.const import USER_CONFIG_PATH, REPO_NAME_LOC +from portage.const import (MANIFEST2_HASH_FUNCTIONS, MANIFEST2_REQUIRED_= HASH, + REPO_NAME_LOC, USER_CONFIG_PATH) from portage.env.loaders import KeyValuePairFileLoader from portage.util import normalize_path, writemsg, writemsg_level, shlex= _split from portage.localization import _ @@ -385,6 +387,26 @@ class RepoConfigLoader(object): manifest_hashes =3D layout_data.get('manifest-hashes') if manifest_hashes is not None: manifest_hashes =3D frozenset(manifest_hashes.upper().split()) + if MANIFEST2_REQUIRED_HASH not in manifest_hashes: + warnings.warn(("Repository named '%s' has a " + "'manifest-hashes' setting that 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: %s" % (repo.name, + MANIFEST2_REQUIRED_HASH, + layout_filename))) + unsupported_hashes =3D manifest_hashes.difference( + MANIFEST2_HASH_FUNCTIONS) + if unsupported_hashes: + warnings.warn(("Repository named '%s' has a " + "'manifest-hashes' setting that 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: %s" % (repo.name, + " ".join(sorted(unsupported_hashes)), + layout_filename))) repo.manifest_hashes =3D manifest_hashes =20 repo.cache_is_authoritative =3D layout_data.get('authoritative-cache'= , 'false').lower() =3D=3D 'true'