From 310da49821ea455a88ac55e3901fb6f9fcb79e21 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 27 Oct 2011 11:29:33 -0700 Subject: LocationsManager.load_profiles: realpath repos Since we already call realpath on make.profile, we also need to call realpath on the repo paths that we compare its nodes to. --- pym/portage/package/ebuild/_config/LocationsManager.py | 5 +++-- pym/portage/package/ebuild/config.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'pym') diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py index a4098ba7b..debabed2b 100644 --- a/pym/portage/package/ebuild/_config/LocationsManager.py +++ b/pym/portage/package/ebuild/_config/LocationsManager.py @@ -48,9 +48,10 @@ class LocationsManager(object): self.config_profile_path = config_profile_path def load_profiles(self, known_repository_paths): - known_repos = [os.path.abspath(x) for x in set(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 = [(x + '/', parse_layout_conf(x)[0]) for x in known_repos] + known_repos = tuple((x + '/', parse_layout_conf(x)[0]) + for x in known_repos) if self.config_profile_path is None: self.config_profile_path = \ diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index cfbbad49a..34a326e49 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -405,7 +405,7 @@ class config(object): for confs in [make_globals, make_conf, self.configdict["env"]]: known_repos.extend(confs.get("PORTDIR", '').split()) known_repos.extend(confs.get("PORTDIR_OVERLAY", '').split()) - known_repos = set(known_repos) + known_repos = frozenset(known_repos) locations_manager.load_profiles(known_repos) -- cgit v1.2.3-1-g7c22