summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 77d025607..845a5c3b2 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -815,6 +815,8 @@ class vardbapi(dbapi):
def __init__(self, vardb):
self._vardb = vardb
+ self._eprefix_split_len = len(x for x in \
+ vardb.settings["EPREFIX"].split(os.sep) if x)
def add(self, cpv):
root_len = len(self._vardb._eroot)
@@ -834,7 +836,7 @@ class vardbapi(dbapi):
self._add_path(x, pkg_hash)
x_split = x.split(os.sep)
x_split.pop()
- while x_split:
+ while len(x_split) > self._eprefix_split_len:
parent = os.sep.join(x_split)
if parent in added_paths:
break