summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)