Gentoo Archives: gentoo-commits

From: Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/repository/
Date: Sun, 08 Jan 2012 03:12:24
Message-Id: 951c9b40cd45ba03daadbce94dfa87cda78675b0.arfrever@gentoo
1 commit: 951c9b40cd45ba03daadbce94dfa87cda78675b0
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
3 AuthorDate: Sun Jan 8 03:00:07 2012 +0000
4 Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 8 03:00:07 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=951c9b40
7
8 Set eapi attribute on portage.repository.config.RepoConfig objects.
9
10 ---
11 pym/portage/repository/config.py | 13 ++++++++-----
12 1 files changed, 8 insertions(+), 5 deletions(-)
13
14 diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
15 index 1db691b..2734156 100644
16 --- a/pym/portage/repository/config.py
17 +++ b/pym/portage/repository/config.py
18 @@ -1,4 +1,4 @@
19 -# Copyright 2010-2011 Gentoo Foundation
20 +# Copyright 2010-2012 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22
23 import io
24 @@ -19,8 +19,8 @@ from portage import eclass_cache, os
25 from portage.const import (MANIFEST2_HASH_FUNCTIONS, MANIFEST2_REQUIRED_HASH,
26 REPO_NAME_LOC, USER_CONFIG_PATH)
27 from portage.env.loaders import KeyValuePairFileLoader
28 -from portage.util import (normalize_path, writemsg, writemsg_level,
29 - shlex_split, stack_lists)
30 +from portage.util import (normalize_path, read_corresponding_eapi_file, shlex_split,
31 + stack_lists, writemsg, writemsg_level)
32 from portage.localization import _
33 from portage import _unicode_decode
34 from portage import _unicode_encode
35 @@ -46,7 +46,7 @@ class RepoConfig(object):
36 """Stores config of one repository"""
37
38 __slots__ = ('aliases', 'allow_missing_manifest',
39 - 'cache_formats', 'create_manifest', 'disable_manifest',
40 + 'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
41 'eclass_db', 'eclass_locations', 'eclass_overrides', 'format', 'location',
42 'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
43 'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest',
44 @@ -106,12 +106,15 @@ class RepoConfig(object):
45 location = None
46 self.location = location
47
48 + eapi = None
49 missing = True
50 if self.location is not None:
51 + eapi = read_corresponding_eapi_file(os.path.join(self.location, REPO_NAME_LOC))
52 name, missing = self._read_valid_repo_name(self.location)
53 -
54 elif name == "DEFAULT":
55 missing = False
56 +
57 + self.eapi = eapi
58 self.name = name
59 self.missing_repo_name = missing
60 self.sign_manifest = True