portage.util.writeable_check module¶
Methods to check whether Portage is going to write to read-only filesystems. Since the methods are not portable across different OSes, each OS needs its own method. To expand RO checking for different OSes, add a method which accepts a list of directories and returns a list of mounts which need to be remounted RW, then add “elif ostype == (the ostype value for your OS)” to get_ro_checker().
- portage.util.writeable_check.empty_ro_checker(dir_list)¶
Always returns [], this is the fallback function if the system does not have an ro_checker method defined.
- portage.util.writeable_check.get_ro_checker()¶
Uses the system type to find an appropriate method for testing whether Portage is going to write to any read-only filesystems.
- Returns
A method for testing for RO filesystems appropriate to the current system.
- portage.util.writeable_check.linux_ro_checker(dir_list)¶
Use /proc/self/mountinfo to check that no directories installed by the ebuild are set to be installed to a read-only filesystem.
- Parameters
dir_list (List) – A list of directories installed by the ebuild.
- Returns
1. A list of filesystems which are both set to be written to and are mounted read-only, may be empty.