The ro_checker code added in commit 47ef9a0969474f963dc8e52bfbbb8bc075e8d73c incorrectly asserts that the parent directories of EPREFIX be writable. Fix it to skip the parents, since they are irrelevant. This does not affect the case where EPREFIX is empty, since all directories are checked in that case.
Fixes 47ef9a096947: ("Test for read-only filesystems, fixes bug 378869") X-Gentoo-Bug: 544624 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=544624 --- pym/portage/dbapi/vartree.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 277c2f1..1c0deab 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3751,6 +3751,7 @@ class dblink(object): line_ending_re = re.compile('[\n\r]') srcroot_len = len(srcroot) ed_len = len(self.settings["ED"]) + eprefix_len = len(self.settings["EPREFIX"]) while True: @@ -3792,7 +3793,11 @@ class dblink(object): break relative_path = parent[srcroot_len:] - dirlist.append(os.path.join(destroot, relative_path)) + if len(relative_path) >= eprefix_len: + # Files are never installed outside of the prefix, + # therefore we skip the readonly filesystem check for + # parent directories of the prefix (see bug 544624). + dirlist.append(os.path.join(destroot, relative_path)) for fname in files: try: -- 2.3.1