1 |
commit: 440acc06b175f642de305f063fbf63805cdce3d8 |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org> |
3 |
AuthorDate: Sun Jan 8 03:06:31 2012 +0000 |
4 |
Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 8 03:06:31 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=440acc06 |
7 |
|
8 |
Set portage-1 as default profile format for repositories using EAPI="4-python". |
9 |
|
10 |
--- |
11 |
pym/portage/repository/config.py | 6 +++++- |
12 |
1 files changed, 5 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py |
15 |
index 2734156..3207b30 100644 |
16 |
--- a/pym/portage/repository/config.py |
17 |
+++ b/pym/portage/repository/config.py |
18 |
@@ -669,6 +669,7 @@ def _get_repo_name(repo_location, cached=None): |
19 |
return name |
20 |
|
21 |
def parse_layout_conf(repo_location, repo_name=None): |
22 |
+ eapi = read_corresponding_eapi_file(os.path.join(repo_location, REPO_NAME_LOC)) |
23 |
|
24 |
layout_filename = os.path.join(repo_location, "metadata", "layout.conf") |
25 |
layout_file = KeyValuePairFileLoader(layout_filename, None, None) |
26 |
@@ -742,7 +743,10 @@ def parse_layout_conf(repo_location, repo_name=None): |
27 |
|
28 |
raw_formats = layout_data.get('profile-formats') |
29 |
if raw_formats is None: |
30 |
- raw_formats = ('portage-1-compat',) |
31 |
+ if eapi in ('4-python',): |
32 |
+ raw_formats = ('portage-1',) |
33 |
+ else: |
34 |
+ raw_formats = ('portage-1-compat',) |
35 |
else: |
36 |
raw_formats = set(raw_formats.split()) |
37 |
unknown = raw_formats.difference(['pms', 'portage-1']) |