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 1RG39i-0007Gc-DD for garchives@archives.gentoo.org; Tue, 18 Oct 2011 06:28:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE6D8E0458; Tue, 18 Oct 2011 06:27:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7B243E0458 for ; Tue, 18 Oct 2011 06:27:57 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 005151B400F for ; Tue, 18 Oct 2011 06:27:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 36EAC80042 for ; Tue, 18 Oct 2011 06:27:56 +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: <0c14f511444b74e4e19b4aed7af910cc8cfae8a5.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/config.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0c14f511444b74e4e19b4aed7af910cc8cfae8a5 Date: Tue, 18 Oct 2011 06:27:56 +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: 785c42aa1885387fcdca9851e9568d35 commit: 0c14f511444b74e4e19b4aed7af910cc8cfae8a5 Author: Zac Medico gentoo org> AuthorDate: Tue Oct 18 06:27:46 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 18 06:27:46 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D0c14f511 load_best_module: tweak metadata_overlay fallback --- pym/portage/package/ebuild/config.py | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/e= build/config.py index 2739584..542cfac 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -126,6 +126,11 @@ class config(object): 'PROPERTIES', 'PROVIDE', 'RDEPEND', 'SLOT', 'repository', 'RESTRICT', 'LICENSE',) =20 + _module_aliases =3D { + "cache.metadata_overlay.database" : "portage.cache.flat_hash.database"= , + "portage.cache.metadata_overlay.database" : "portage.cache.flat_hash.d= atabase", + } + _case_insensitive_vars =3D special_env_vars.case_insensitive_vars _default_globals =3D special_env_vars.default_globals _env_blacklist =3D special_env_vars.env_blacklist @@ -880,18 +885,16 @@ class config(object): try: mod =3D load_mod(best_mod) except ImportError: - if not best_mod.startswith("cache."): + if best_mod in self._module_aliases: + mod =3D load_mod(self._module_aliases[best_mod]) + elif not best_mod.startswith("cache."): raise else: best_mod =3D "portage." + best_mod try: mod =3D load_mod(best_mod) except ImportError: - if best_mod =3D=3D "portage.cache.metadata_overlay.database": - best_mod =3D "portage.cache.flat_hash.database" - mod =3D load_mod(best_mod) - else: - raise + raise return mod =20 def lock(self):