commit: 1d351a59a57e018e9c79a371f0cae21505c2249c Author: Bertrand SIMONNET <bsimonnet <AT> chromium <DOT> org> AuthorDate: Tue Sep 30 00:12:36 2014 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Fri Oct 24 20:07:42 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1d351a59
Add profile-formats to profile_complex --- pym/portage/package/ebuild/_config/LocationsManager.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py index 4427f1d..8bf321c 100644 --- a/pym/portage/package/ebuild/_config/LocationsManager.py +++ b/pym/portage/package/ebuild/_config/LocationsManager.py @@ -31,7 +31,7 @@ _PORTAGE1_DIRECTORIES = frozenset([ 'use.mask', 'use.force']) _profile_node = collections.namedtuple('_profile_node', - 'location portage1_directories user_config') + 'location portage1_directories user_config profile_formats') _allow_parent_colon = frozenset( ["portage-2"]) @@ -132,7 +132,7 @@ class LocationsManager(object): self.user_profile_dir = custom_prof self.profiles.append(custom_prof) self.profiles_complex.append( - _profile_node(custom_prof, True, True)) + _profile_node(custom_prof, True, True, ())) del custom_prof self.profiles = tuple(self.profiles) @@ -151,6 +151,7 @@ class LocationsManager(object): allow_parent_colon = True repo_loc = None compat_mode = False + current_formats = () eapi_file = os.path.join(currentPath, "eapi") eapi = "0" @@ -183,6 +184,8 @@ class LocationsManager(object): layout_data['profile-formats'] == ('portage-1-compat',) allow_parent_colon = any(x in _allow_parent_colon for x in layout_data['profile-formats']) + current_formats = tuple(layout_data['profile-formats']) + if compat_mode: offenders = _PORTAGE1_DIRECTORIES.intersection(os.listdir(currentPath)) @@ -233,7 +236,8 @@ class LocationsManager(object): self.profiles.append(currentPath) self.profiles_complex.append( - _profile_node(currentPath, allow_directories, False)) + _profile_node(currentPath, allow_directories, False, + current_formats)) def _expand_parent_colon(self, parentsFile, parentPath, repo_loc, repositories):