1 |
On Sun, 5 Apr 2015 21:28:07 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> The ro_checker code added in commit |
5 |
> 47ef9a0969474f963dc8e52bfbbb8bc075e8d73c incorrectly asserts that the |
6 |
> parent directories of EPREFIX be writable. Fix it to skip the parents, |
7 |
> since they are irrelevant. This does not affect the case where EPREFIX |
8 |
> is empty, since all directories are checked in that case. |
9 |
> |
10 |
> Fixes 47ef9a096947: ("Test for read-only filesystems, fixes bug |
11 |
> 378869") X-Gentoo-Bug: 544624 |
12 |
> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=544624 |
13 |
> --- |
14 |
> pym/portage/dbapi/vartree.py | 7 ++++++- |
15 |
> 1 file changed, 6 insertions(+), 1 deletion(-) |
16 |
> |
17 |
> diff --git a/pym/portage/dbapi/vartree.py |
18 |
> b/pym/portage/dbapi/vartree.py index 277c2f1..1c0deab 100644 |
19 |
> --- a/pym/portage/dbapi/vartree.py |
20 |
> +++ b/pym/portage/dbapi/vartree.py |
21 |
> @@ -3751,6 +3751,7 @@ class dblink(object): |
22 |
> line_ending_re = re.compile('[\n\r]') |
23 |
> srcroot_len = len(srcroot) |
24 |
> ed_len = len(self.settings["ED"]) |
25 |
> + eprefix_len = len(self.settings["EPREFIX"]) |
26 |
> |
27 |
> while True: |
28 |
> |
29 |
> @@ -3792,7 +3793,11 @@ class dblink(object): |
30 |
> break |
31 |
> |
32 |
> relative_path = parent[srcroot_len:] |
33 |
> - |
34 |
> dirlist.append(os.path.join(destroot, relative_path)) |
35 |
> + if len(relative_path) >= eprefix_len: |
36 |
> + # Files are never installed |
37 |
> outside of the prefix, |
38 |
> + # therefore we skip the |
39 |
> readonly filesystem check for |
40 |
> + # parent directories of the |
41 |
> prefix (see bug 544624). |
42 |
> + |
43 |
> dirlist.append(os.path.join(destroot, relative_path)) |
44 |
> for fname in files: |
45 |
> try: |
46 |
|
47 |
LGTM |
48 |
|
49 |
-- |
50 |
Brian Dolbec <dolsen> |