From 46c50903c00123a4e30b9032fe9ffc345c811570 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Oct 2011 15:06:50 -0700 Subject: [PATCH] config: discard profiles_complex attribute Like LocationsManager, it's only used in the constructor, so there's no need to hold a reference after the constructor completes. --- pym/portage/package/ebuild/config.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 1ad1ad76f..765a4f77d 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -210,7 +210,6 @@ class config(object): self.module_priority = clone.module_priority self.profile_path = clone.profile_path self.profiles = clone.profiles - self.profiles_complex = clone.profiles_complex self.packages = clone.packages self.repositories = clone.repositories self._iuse_implicit_match = clone._iuse_implicit_match @@ -408,8 +407,8 @@ class config(object): locations_manager.load_profiles(known_repos) + profiles_complex = locations_manager.profiles_complex self.profiles = locations_manager.profiles - self.profiles_complex = locations_manager.profiles_complex self.profile_path = locations_manager.profile_path self.user_profile_dir = locations_manager.user_profile_dir @@ -556,11 +555,11 @@ class config(object): self._repo_make_defaults[repo.name] = d #Read package.keywords and package.accept_keywords. - self._keywords_manager = KeywordsManager(self.profiles_complex, abs_user_config, \ + self._keywords_manager = KeywordsManager(profiles_complex, abs_user_config, \ local_config, global_accept_keywords=self.configdict["defaults"].get("ACCEPT_KEYWORDS", "")) #Read all USE related files from profiles and optionally from user config. - self._use_manager = UseManager(self.repositories, self.profiles_complex, abs_user_config, user_config=local_config) + self._use_manager = UseManager(self.repositories, profiles_complex, abs_user_config, user_config=local_config) #Initialize all USE related variables we track ourselves. self.usemask = self._use_manager.getUseMask() self.useforce = self._use_manager.getUseForce() @@ -577,7 +576,7 @@ class config(object): self.configdict["conf"].get("ACCEPT_LICENSE", "")) #Read package.mask and package.unmask from profiles and optionally from user config - self._mask_manager = MaskManager(self.repositories, self.profiles_complex, + self._mask_manager = MaskManager(self.repositories, profiles_complex, abs_user_config, user_config=local_config, strict_umatched_removal=_unmatched_removal) @@ -639,7 +638,7 @@ class config(object): pkgprovidedlines = [grabfile( os.path.join(x.location, "package.provided"), recursive=x.portage1_directories) - for x in self.profiles_complex] + for x in profiles_complex] pkgprovidedlines = stack_lists(pkgprovidedlines, incremental=1) has_invalid_data = False for x in range(len(pkgprovidedlines)-1, -1, -1): -- 2.26.2