Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico" <zmedico@g.o>
Subject: proj/portage:master commit in: man/, pym/portage/repository/
Date: Fri, 28 Oct 2011 06:17:29 +0000 (UTC)
commit:     46d97be05dae690373ef802788adb5cf1505f947
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 06:17:19 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 06:17:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=46d97be0

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 = java\-overlay java\-experimental
 # disable all eclass overrides for ebuilds from the gentoo repository
 eclass\-overrides =
 # when processing metadata/layout.conf from other repositories, substitute
-# 'gentoo' in place of references to repositories named 'foo' and 'bar'
-aliases = 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 = foo bar -baz
 
 [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/config.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 = layout_data['masters']
 
-			aliases = layout_data.get('aliases')
-			if aliases and aliases.strip():
-				aliases = aliases.split()
-			else:
-				aliases = None
-
 			if layout_data['aliases']:
 				aliases = repo.aliases
 				if aliases is None:
 					aliases = ()
-				repo.aliases = tuple(aliases) + layout_data['aliases']
+				# repos.conf aliases come after layout.conf aliases, giving
+				# them the ability to do incremental overrrides
+				repo.aliases = layout_data['aliases'] + tuple(aliases)
 
 			for value in ('sign-manifest', 'thin-manifest', 'allow-missing-manifest',
 				'create-manifest', 'disable-manifest', 'cache-formats', 'manifest-hashes',
@@ -417,7 +414,8 @@ class RepoConfigLoader(object):
 			names = set()
 			names.add(repo_name)
 			if repo.aliases:
-				names.update(repo.aliases)
+				aliases = stack_lists([repo.aliases], incremental=True)
+				names.update(aliases)
 
 			for name in names:
 				if name in new_prepos:


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in sys-devel/distcc/files: distcc-config-3.2_rc1 distcc-3.2_rc1-python.patch distcc-3.2_rc1-gssapi.patch distcc-3.2_rc1-freedesktop.patch
Next by thread:
gentoo-x86 commit in games-action/violetland: violetland-0.4.3.ebuild ChangeLog violetland-0.4.0.ebuild violetland-0.3.1.ebuild
Previous by date:
gentoo-x86 commit in sys-devel/distcc/files: distcc-config-3.2_rc1 distcc-3.2_rc1-python.patch distcc-3.2_rc1-gssapi.patch distcc-3.2_rc1-freedesktop.patch
Next by date:
proj/portage:master commit in: pym/portage/repository/


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.