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 1RJfl7-0004B1-6G for garchives@archives.gentoo.org; Fri, 28 Oct 2011 06:17:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7801FE0592; Fri, 28 Oct 2011 06:17:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 375CEE0592 for ; Fri, 28 Oct 2011 06:17:31 +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 661DC1B400A for ; Fri, 28 Oct 2011 06:17:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id AE24D80042 for ; Fri, 28 Oct 2011 06:17:29 +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: <46d97be05dae690373ef802788adb5cf1505f947.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/portage/repository/ X-VCS-Repository: proj/portage X-VCS-Files: man/portage.5 pym/portage/repository/config.py X-VCS-Directories: man/ pym/portage/repository/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 46d97be05dae690373ef802788adb5cf1505f947 Date: Fri, 28 Oct 2011 06:17:29 +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: 8cb8f5c8cfde8038b345fb6d5c09c926 commit: 46d97be05dae690373ef802788adb5cf1505f947 Author: Zac Medico gentoo org> AuthorDate: Fri Oct 28 06:17:19 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Oct 28 06:17:19 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D46d97be0 RepoConfigLoader: support incremental aliases This allows a user to discard unwanted aliases that are specified in a repo's layout.conf. --- man/portage.5 | 5 +++-- pym/portage/repository/config.py | 16 +++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/man/portage.5 b/man/portage.5 index 45eef36..7fa5660 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -708,8 +708,9 @@ eclass\-overrides =3D java\-overlay java\-experimenta= l # disable all eclass overrides for ebuilds from the gentoo repository eclass\-overrides =3D # when processing metadata/layout.conf from other repositories, substitu= te -# 'gentoo' in place of references to repositories named 'foo' and 'bar' -aliases =3D foo bar +# 'gentoo' in place of references to repositories named 'foo' and 'bar', +# and discard the 'baz' alias contained in gentoo's layout.conf +aliases =3D foo bar -baz =20 [kde-testing] # override the metadata/layout.conf masters setting from the kde-testing= repo diff --git a/pym/portage/repository/config.py b/pym/portage/repository/co= nfig.py index 5b5ddd6..1a7effe 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -19,7 +19,8 @@ from portage import os 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.util import (normalize_path, writemsg, writemsg_level, + shlex_split, stack_lists) from portage.localization import _ from portage import _unicode_decode from portage import _unicode_encode @@ -390,17 +391,13 @@ class RepoConfigLoader(object): if repo.masters is None: repo.masters =3D layout_data['masters'] =20 - aliases =3D layout_data.get('aliases') - if aliases and aliases.strip(): - aliases =3D aliases.split() - else: - aliases =3D None - if layout_data['aliases']: aliases =3D repo.aliases if aliases is None: aliases =3D () - repo.aliases =3D tuple(aliases) + layout_data['aliases'] + # repos.conf aliases come after layout.conf aliases, giving + # them the ability to do incremental overrrides + repo.aliases =3D layout_data['aliases'] + tuple(aliases) =20 for value in ('sign-manifest', 'thin-manifest', 'allow-missing-manife= st', 'create-manifest', 'disable-manifest', 'cache-formats', 'manifest-ha= shes', @@ -417,7 +414,8 @@ class RepoConfigLoader(object): names =3D set() names.add(repo_name) if repo.aliases: - names.update(repo.aliases) + aliases =3D stack_lists([repo.aliases], incremental=3DTrue) + names.update(aliases) =20 for name in names: if name in new_prepos: