Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 374072 Details for
Bug 505428
sys-apps/portage-2.2.8-r1 incorrectly detects root mount read-only in chroot when it isn't
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixed reverse order patch
0001-portage-utilwriteable_check.py:ReverseorderofROcheck(bug505428).patch (text/plain), 1.72 KB, created by
Brian Dolbec (RETIRED)
on 2014-04-02 07:45:39 UTC
(
hide
)
Description:
fixed reverse order patch
Filename:
MIME Type:
Creator:
Brian Dolbec (RETIRED)
Created:
2014-04-02 07:45:39 UTC
Size:
1.72 KB
patch
obsolete
>From e17d7aabfc512537a696319e425fe0bcda25cbde Mon Sep 17 00:00:00 2001 >From: Brian Dolbec <dolsen@gentoo.org> >Date: Tue, 1 Apr 2014 21:41:37 -0700 >Subject: [PATCH] portage/util/writeable_check.py: Reverse order of RO check > (bug 505428) > >The read only check is falsely detecting readonly filesystems while in the chroot. >Reversing the search order should solve the problem. >Apply Douglas Freeds improvements. > >dgdfgdf >--- > pym/portage/util/writeable_check.py | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > >diff --git a/pym/portage/util/writeable_check.py b/pym/portage/util/writeable_check.py >index e6ddce6..eefac63 100644 >--- a/pym/portage/util/writeable_check.py >+++ b/pym/portage/util/writeable_check.py >@@ -43,16 +43,18 @@ def linux_ro_checker(dir_list): > 1. A list of filesystems which are both set to be written to and are mounted > read-only, may be empty. > """ >+ mounted_filesystems = set() > ro_filesystems = set() > > try: >- with io.open("/proc/mounts", mode='r', encoding=_encodings['content'], >- errors='replace') as f: >- roregex = re.compile(r'(\A|,)ro(\Z|,)') >- for line in f: >- if roregex.search(line.split(" ")[3].strip()) is not None: >- romount = line.split(" ")[1].strip() >- ro_filesystems.add(romount) >+ roregex = re.compile(r'(\A|,)ro(\Z|,)') >+ with io.open("/proc/mounts", mode='r', encoding=_encodings['content'],errors='replace') as f: >+ for line in f.readlines().reverse(): >+ path, options = map(str.strip, line.split(" ")[0:4:3]) >+ if path not in mounted_filesystems: >+ mounted_filesystems.add(path) >+ if roregex.search(path) is not None: >+ ro_filesystems.add(path) > > # If /proc/mounts can't be read, assume that there are no RO > # filesystems and return. >-- >1.8.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 505428
:
374070
| 374072