From 7e2781d25b1d7869ae460bd19c881081bc46b6e5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 11 Oct 2010 18:22:47 -0700 Subject: Avoid reapath('') expansion to cwd for repos. --- pym/portage/repository/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pym/portage/repository') diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 35ddd140a..f9c7911ab 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -80,9 +80,11 @@ class RepoConfig(object): location = repo_opts.get('location') self.user_location = location - if location is not None: + if location is not None and location.strip(): if os.path.isdir(location): location = os.path.realpath(location) + else: + location = None self.location = location missing = True @@ -265,7 +267,9 @@ class RepoConfigLoader(object): ignored_map = {} ignored_location_map = {} - portdir = os.path.realpath(settings.get('PORTDIR', '')) + portdir = settings.get('PORTDIR', '') + if portdir and portdir.strip(): + portdir = os.path.realpath(portdir) portdir_overlay = settings.get('PORTDIR_OVERLAY', '') parse(paths, prepos, ignored_map, ignored_location_map) add_overlays(portdir, portdir_overlay, prepos, ignored_map, ignored_location_map) -- cgit v1.2.3-1-g7c22