diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2012-01-08 04:00:07 +0100 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2012-01-08 04:00:07 +0100 |
commit | 951c9b40cd45ba03daadbce94dfa87cda78675b0 (patch) | |
tree | 545424350c59744d81bdfe329bb7ce1a1ff7a1c2 | |
parent | f132600314270f5fbbd168d941566d0fd877eb18 (diff) | |
download | portage-951c9b40cd45ba03daadbce94dfa87cda78675b0.tar.gz portage-951c9b40cd45ba03daadbce94dfa87cda78675b0.tar.bz2 portage-951c9b40cd45ba03daadbce94dfa87cda78675b0.zip |
Set eapi attribute on portage.repository.config.RepoConfig objects.
-rw-r--r-- | pym/portage/repository/config.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 1db691be1..273415604 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -1,4 +1,4 @@ -# Copyright 2010-2011 Gentoo Foundation +# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import io @@ -19,8 +19,8 @@ from portage import eclass_cache, 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, stack_lists) +from portage.util import (normalize_path, read_corresponding_eapi_file, shlex_split, + stack_lists, writemsg, writemsg_level) from portage.localization import _ from portage import _unicode_decode from portage import _unicode_encode @@ -46,7 +46,7 @@ class RepoConfig(object): """Stores config of one repository""" __slots__ = ('aliases', 'allow_missing_manifest', - 'cache_formats', 'create_manifest', 'disable_manifest', + 'cache_formats', 'create_manifest', 'disable_manifest', 'eapi', 'eclass_db', 'eclass_locations', 'eclass_overrides', 'format', 'location', 'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name', 'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest', @@ -106,12 +106,15 @@ class RepoConfig(object): location = None self.location = location + eapi = None missing = True if self.location is not None: + eapi = read_corresponding_eapi_file(os.path.join(self.location, REPO_NAME_LOC)) name, missing = self._read_valid_repo_name(self.location) - elif name == "DEFAULT": missing = False + + self.eapi = eapi self.name = name self.missing_repo_name = missing self.sign_manifest = True |