From: Zac Medico Date: Tue, 12 Oct 2010 01:22:47 +0000 (-0700) Subject: Avoid reapath('') expansion to cwd for repos. X-Git-Tag: v2.2_rc93~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e2781d25b1d7869ae460bd19c881081bc46b6e5;p=portage.git Avoid reapath('') expansion to cwd for repos. --- 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)