From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B1F04138A1C for ; Mon, 6 Apr 2015 04:28:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 019A5E0929; Mon, 6 Apr 2015 04:28:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 28A69E0925 for ; Mon, 6 Apr 2015 04:28:19 +0000 (UTC) Received: from localhost.localdomain (ip174-67-205-96.oc.oc.cox.net [174.67.205.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id D2087340A29; Mon, 6 Apr 2015 04:28:17 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Zac Medico Subject: [gentoo-portage-dev] [PATCH] ro_checker: skip parents of EPREFIX dir (bug 544624) Date: Sun, 5 Apr 2015 21:28:07 -0700 Message-Id: <1428294487-20104-1-git-send-email-zmedico@gentoo.org> X-Mailer: git-send-email 2.3.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 71938add-5875-4999-8548-501cfe0d0feb X-Archives-Hash: 404c2ea6e94a93458d987af2613b6bee 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