diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-10-27 11:29:33 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-10-27 11:29:33 -0700 |
commit | 310da49821ea455a88ac55e3901fb6f9fcb79e21 (patch) | |
tree | dee4066dfea76b9d62ef1567da7a5386b1dc5887 | |
parent | 30e5cfa6c706c02e9920deda543b7faf29733e0b (diff) | |
download | portage-310da49821ea455a88ac55e3901fb6f9fcb79e21.tar.gz portage-310da49821ea455a88ac55e3901fb6f9fcb79e21.tar.bz2 portage-310da49821ea455a88ac55e3901fb6f9fcb79e21.zip |
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.
-rw-r--r-- | pym/portage/package/ebuild/_config/LocationsManager.py | 5 | ||||
-rw-r--r-- | pym/portage/package/ebuild/config.py | 2 |
2 files changed, 4 insertions, 3 deletions
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) |