self.abs_user_config = os.path.join(self.config_root, USER_CONFIG_PATH)
self.config_profile_path = config_profile_path
- def load_profiles(self, known_repository_paths):
- known_repos = set(os.path.realpath(x) for x in known_repository_paths)
- # force a trailing '/' for ease of doing startswith checks
- known_repos = tuple((x + '/', parse_layout_conf(x)[0])
- for x in known_repos)
+ def load_profiles(self, repositories, known_repository_paths):
+ known_repository_paths = set(os.path.realpath(x)
+ for x in known_repository_paths)
+
+ known_repos = []
+ for x in known_repository_paths:
+ try:
+ layout_data = {"profile-formats":
+ repositories.get_repo_for_location(x).profile_formats}
+ except KeyError:
+ layout_data = parse_layout_conf(x)[0]
+ # force a trailing '/' for ease of doing startswith checks
+ known_repos.append((x + '/', layout_data))
+ known_repos = tuple(known_repos)
if self.config_profile_path is None:
self.config_profile_path = \
self.lookuplist = [self.configdict["env"]]
self.repositories = load_repository_config(self)
- locations_manager.load_profiles(known_repos)
+ locations_manager.load_profiles(self.repositories, known_repos)
profiles_complex = locations_manager.profiles_complex
self.profiles = locations_manager.profiles
'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_commit', 'sign_manifest', 'sync', 'thin_manifest',
+ 'name', 'priority', 'profile_formats', 'sign_commit', 'sign_manifest', 'sync', 'thin_manifest',
'update_changelog', 'user_location', 'portage1_profiles',
'portage1_profiles_compat')
for value in ('allow-missing-manifest',
'allow-provide-virtual', 'cache-formats',
'create-manifest', 'disable-manifest', 'manifest-hashes',
+ 'profile-formats',
'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'):
setattr(self, value.lower().replace("-", "_"), layout_data[value])