public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] ro_checker: skip parents of EPREFIX dir (bug 544624)
Date: Sun, 5 Apr 2015 21:56:32 -0700	[thread overview]
Message-ID: <20150405215632.2f909db4.dolsen@gentoo.org> (raw)
In-Reply-To: <1428294487-20104-1-git-send-email-zmedico@gentoo.org>

On Sun,  5 Apr 2015 21:28:07 -0700
Zac Medico <zmedico@gentoo.org> wrote:

> 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:

LGTM

-- 
Brian Dolbec <dolsen>



      reply	other threads:[~2015-04-06  4:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06  4:28 [gentoo-portage-dev] [PATCH] ro_checker: skip parents of EPREFIX dir (bug 544624) Zac Medico
2015-04-06  4:56 ` Brian Dolbec [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150405215632.2f909db4.dolsen@gentoo.org \
    --to=dolsen@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox