summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-11 18:22:47 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-11 18:22:47 -0700
commit7e2781d25b1d7869ae460bd19c881081bc46b6e5 (patch)
tree998c19c885468fb602b5ed3bcea98983192180eb
parent66645836c289690d6f86efadfc224874d7352826 (diff)
downloadportage-7e2781d25b1d7869ae460bd19c881081bc46b6e5.tar.gz
portage-7e2781d25b1d7869ae460bd19c881081bc46b6e5.tar.bz2
portage-7e2781d25b1d7869ae460bd19c881081bc46b6e5.zip
Avoid reapath('') expansion to cwd for repos.
-rw-r--r--pym/portage/repository/config.py8
1 files changed, 6 insertions, 2 deletions
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)