1 |
commit: 43e0b3ea4289aab9b4258d29d06afac40abd6c01 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 1 20:42:56 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 1 20:42:56 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=43e0b3ea |
7 |
|
8 |
owners_cache: add parent dirs deeper than EPREFIX |
9 |
|
10 |
--- |
11 |
pym/portage/dbapi/vartree.py | 4 +++- |
12 |
1 files changed, 3 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
15 |
index 77d0256..845a5c3 100644 |
16 |
--- a/pym/portage/dbapi/vartree.py |
17 |
+++ b/pym/portage/dbapi/vartree.py |
18 |
@@ -815,6 +815,8 @@ class vardbapi(dbapi): |
19 |
|
20 |
def __init__(self, vardb): |
21 |
self._vardb = vardb |
22 |
+ self._eprefix_split_len = len(x for x in \ |
23 |
+ vardb.settings["EPREFIX"].split(os.sep) if x) |
24 |
|
25 |
def add(self, cpv): |
26 |
root_len = len(self._vardb._eroot) |
27 |
@@ -834,7 +836,7 @@ class vardbapi(dbapi): |
28 |
self._add_path(x, pkg_hash) |
29 |
x_split = x.split(os.sep) |
30 |
x_split.pop() |
31 |
- while x_split: |
32 |
+ while len(x_split) > self._eprefix_split_len: |
33 |
parent = os.sep.join(x_split) |
34 |
if parent in added_paths: |
35 |
break |